charts
charts copied to clipboard
[chart/redis-ha] Adding extra labels to antiAffinity
Is your feature request related to a problem? Please describe. Because antiAffinities aren't namespaced, if you run 2 redis-ha helm charts with the same name across 2 namespaces (and example would be a SaaS that does user isolation with namespaces), they will avoid each other. If we can add an extra label set in there, we can them to co-exist in the same servers.
@tschirmer We already support this with override the affinity.
Is there something more specific you're asking for? My concern would be if this was "too specific" it becomes overly more complex than it already is.
affinity:
{{- if .Values.affinity }}
{{- with .Values.affinity }}
{{ tpl . $ | indent 8 }}
{{- end }}
{{- else }}
{{- if .Values.additionalAffinities }}
{{ toYaml .Values.additionalAffinities | indent 8 }}
{{- end }}
podAntiAffinity:
{{- if .Values.hardAntiAffinity }}
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchLabels:
app: {{ template "redis-ha.name" . }}
release: {{ .Release.Name }}
{{ template "redis-ha.fullname" . }}: replica
topologyKey: kubernetes.io/hostname
{{- else }}
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
app: {{ template "redis-ha.name" . }}
release: {{ .Release.Name }}
{{ template "redis-ha.fullname" . }}: replica
topologyKey: kubernetes.io/hostname
{{- end }}
{{- end }}