{{- if .Values.redis.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "datacenter-docs.redis.fullname" . }} labels: {{- include "datacenter-docs.redis.labels" . | nindent 4 }} spec: replicas: 1 selector: matchLabels: {{- include "datacenter-docs.redis.selectorLabels" . | nindent 6 }} template: metadata: labels: {{- include "datacenter-docs.redis.selectorLabels" . | nindent 8 }} {{- with .Values.podAnnotations }} annotations: {{- toYaml . | nindent 8 }} {{- end }} spec: {{- with .Values.global.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "datacenter-docs.serviceAccountName" . }} securityContext: fsGroup: 999 runAsUser: 999 containers: - name: redis image: "{{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }}" imagePullPolicy: {{ .Values.redis.image.pullPolicy }} ports: - name: redis containerPort: 6379 protocol: TCP livenessProbe: exec: command: - redis-cli - ping initialDelaySeconds: 30 periodSeconds: 10 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: exec: command: - redis-cli - ping initialDelaySeconds: 10 periodSeconds: 5 timeoutSeconds: 3 failureThreshold: 3 resources: {{- toYaml .Values.redis.resources | nindent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.tolerations }} tolerations: {{- toYaml . | nindent 8 }} {{- end }} {{- end }}