Created
February 9, 2022 01:08
-
-
Save sudonewdev/37f006f855b9bef493e7bd63d5fd96f9 to your computer and use it in GitHub Desktop.
only .Release.Name values is being printed even after else-if condition is met.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{/* | |
podAntiAffinity definition | |
*/}} | |
{{- define "pods.anti.affinities" -}} | |
podAntiAffinity: | |
requiredDuringSchedulingIgnoredDuringExecution: | |
- labelSelector: | |
matchExpressions: | |
- key: app.kubernetes.io/instance | |
operator: In | |
{{- if and ( default .Values.alpha true ) ( default .Values.beta false ) }} | |
values: {{ .Release.Name }} | |
{{- else if and ( default .Values.alpha false ) ( default .Values.beta true )}} | |
values: {{ .Values.extraLabels.nfname }} | |
{{- end }} | |
topologyKey: kubernetes.io/hostname | |
{{- end -}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Applying podAntiAffinity
RELEASE-NAME is always executed even else-if condition is met.
the render template is always showing RELEASE-NAME