This commit is contained in:
Stavros kois
2023-01-30 15:06:06 +02:00
parent d8c845ddec
commit 6e657b584b
2 changed files with 14 additions and 9 deletions

View File

@@ -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 <ixExteernalInterfaceConfigurationNames> is empty." -}}
{{- end -}}
{{- end -}}
{{- end -}}

View File

@@ -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 <ixExteernalInterfaceConfigurationNames> is empty." -}}
{{- end -}}
{{- end -}}
{{- end -}}