{{- if .Values.redis.enabled }} apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "cloudhost-platform.redis.fullname" . }} namespace: {{ include "cloudhost-platform.namespace" . }} labels: app: {{ include "cloudhost-platform.redis.fullname" . }} {{- include "cloudhost-platform.labels" . | nindent 4 }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: {{ include "cloudhost-platform.redis.fullname" . }} template: metadata: labels: app: {{ include "cloudhost-platform.redis.fullname" . }} spec: containers: - name: redis image: {{ .Values.images.redis | quote }} ports: - containerPort: 6379 volumeMounts: - name: data mountPath: /data livenessProbe: exec: command: - redis-cli - ping initialDelaySeconds: 15 periodSeconds: 10 readinessProbe: exec: command: - redis-cli - ping initialDelaySeconds: 5 periodSeconds: 5 {{- with .Values.redis.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} volumes: - name: data persistentVolumeClaim: claimName: {{ include "cloudhost-platform.redis.fullname" . }}-data {{- end }}