-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathredis-statefulset.yaml
More file actions
45 lines (45 loc) · 1.16 KB
/
redis-statefulset.yaml
File metadata and controls
45 lines (45 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{{- if eq .Values.global.redis_location "on-cluster" }}
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: drycc-redis
labels:
heritage: drycc
annotations:
component.drycc.cc/version: {{ .Values.image_tag }}
spec:
serviceName: drycc-redis
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: drycc-redis
template:
metadata:
labels:
app: drycc-redis
spec:
containers:
- name: drycc-redis
image: {{.Values.image_registry}}/{{.Values.image_org}}/redis:{{ .Values.image_tag }}
imagePullPolicy: {{ .Values.image_pull_policy }}
{{- if or (.Values.limits_cpu) (.Values.limits_memory)}}
resources:
limits:
{{- if (.Values.limits_cpu) }}
cpu: {{.Values.limits_cpu}}
{{- end}}
{{- if (.Values.limits_memory) }}
memory: {{.Values.limits_memory}}
{{- end}}
{{- end}}
command: ["/bin/boot", "--port", "6379"]
ports:
- containerPort: 6379
volumeMounts:
- name: redis-creds
mountPath: /var/run/secrets/drycc/redis/creds
volumes:
- name: redis-creds
secret:
secretName: redis-creds
{{- end }}