mirror of
https://github.com/outbackdingo/qdrant-helm.git
synced 2026-01-27 10:20:18 +00:00
Apply tpl() to affinity values to enable reuse of helpers / existing labels (#213)
The Helm tpl function [1] allows to use templates in values. This does make
sense where values might want reference existing labels of a Helm chart.
This is is the case for Pod affinity (or anti-affinity) which needs to match
the labels of the Pods created.
This is somewhat inspired by the way this was done for the NGINX Ingress
Controller with [2].
[1] https://helm.sh/docs/howto/charts_tips_and_tricks/#using-the-tpl-function
[2] af9e5246ad
Resolves: #212
Signed-off-by: Christian Rohmann <christian.rohmann@inovex.de>
This commit is contained in:
committed by
GitHub
parent
3f5f953960
commit
1d4535c118
@@ -199,7 +199,7 @@ spec:
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- tpl (toYaml .) $ | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
|
||||
@@ -121,6 +121,19 @@ nodeSelector: {}
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
# podAntiAffinity:
|
||||
# requiredDuringSchedulingIgnoredDuringExecution:
|
||||
# - labelSelector:
|
||||
# matchExpressions:
|
||||
# - key: app.kubernetes.io/name
|
||||
# operator: In
|
||||
# values:
|
||||
# - '{{ include "qdrant.name" . }}'
|
||||
# - key: app.kubernetes.io/instance
|
||||
# operator: In
|
||||
# values:
|
||||
# - '{{ .Release.Name }}'
|
||||
# topologyKey: "kubernetes.io/hostname"
|
||||
|
||||
topologySpreadConstraints: []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user