diff --git a/library/common/1.0.0/templates/lib/metadata/_podAnnotations.tpl b/library/common/1.0.0/templates/lib/metadata/_podAnnotations.tpl new file mode 100644 index 0000000000..d1df1a98c8 --- /dev/null +++ b/library/common/1.0.0/templates/lib/metadata/_podAnnotations.tpl @@ -0,0 +1,14 @@ +{{/* Labels that are added to podSpec */}} +{{/* Call this template: +{{ include "ix.v1.common.lib.metadata.podAnnotations" $ }} +*/}} +{{- define "ix.v1.common.lib.metadata.podAnnotations" -}} +rollme: {{ randAlphaNum 5 | quote }} + {{- if and .Values.ixExternalInterfacesConfiguration -}} + {{- if .Values.ixExternalInterfacesConfigurationNames }} +k8s.v1.cni.cncf.io/networks: {{ join ", " .Values.ixExternalInterfacesConfigurationNames }} + {{- else -}} + {{- fail "External interfaces defined, but is empty." -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/library/common/1.0.0/templates/lib/metadata/_podLabels.tpl b/library/common/1.0.0/templates/lib/metadata/_podLabels.tpl index eb58759a73..f8f781563e 100644 --- a/library/common/1.0.0/templates/lib/metadata/_podLabels.tpl +++ b/library/common/1.0.0/templates/lib/metadata/_podLabels.tpl @@ -3,13 +3,4 @@ {{ include "ix.v1.common.lib.metadata.podLabels" $ }} */}} {{- define "ix.v1.common.lib.metadata.podLabels" -}} -rollme: {{ randAlphaNum 5 | quote }} -{{- if and .Values.ixExternalInterfacesConfiguration -}} - {{- if .Values.ixExternalInterfacesConfigurationNames }} -k8s.v1.cni.cncf.io/networks: {{ join ", " .Values.ixExternalInterfacesConfigurationNames }} - {{- else -}} - {{- fail "Found external interfaces defined, but is empty." -}} - {{- end -}} -{{- end -}} - {{- end -}}