Skip to content

Instantly share code, notes, and snippets.

@rhefner1
Created August 30, 2018 08:28
Show Gist options
  • Save rhefner1/5ea5e547743dff47f200494d17961698 to your computer and use it in GitHub Desktop.
Save rhefner1/5ea5e547743dff47f200494d17961698 to your computer and use it in GitHub Desktop.
apiVersion: storage.spotahome.com/v1alpha2
kind: RedisFailover
metadata:
name: {{ template "fullname" . }}
labels:
{{ include "labels.resource" (dict "top" .) | indent 4 }}
spec:
hardAntiAffinity: {{ .Values.hardAntiAffinity }}
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: nodeType
operator: In
values:
- {{ .Values.nodeType | quote }}
sentinel:
replicas: {{ .Values.sentinel.replicas }}
image: {{ .Values.image.repo | quote }}
version: {{ .Values.image.tag | quote }}
customConfig:
- "down-after-milliseconds {{ .Values.sentinel.downAfterMilliseconds }}"
- "failover-timeout {{ .Values.sentinel.failoverTimeout }}"
resources:
{{ toYaml .Values.sentinel.resources | indent 6 }}
redis:
replicas: {{ .Values.redis.replicas }}
image: {{ .Values.image.repo | quote }}
version: {{ .Values.image.tag | quote }}
customConfig:
- "tcp-keepalive 60"
resources:
{{ toYaml .Values.redis.resources | indent 6 }}
exporter: {{ .Values.redis.exporter.enabled }}
exporterImage: {{ .Values.redis.exporter.image.repo | quote }}
exporterVersion: {{ .Values.redis.exporter.image.tag | quote }}
storage:
{{- if .Values.redis.persistence.enabled }}
keepAfterDeletion: true
persistentVolumeClaim:
metadata:
name: {{ template "fullname" . }}-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: {{ .Values.redis.persistence.size | quote }}
{{- else }}
emptyDir: {}
{{- end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment