diff --git a/library/common/1.0.0/templates/lib/service/_additionalAnnotations.tpl b/library/common/1.0.0/templates/lib/service/_additionalAnnotations.tpl index be701b162c..c856d03f1c 100644 --- a/library/common/1.0.0/templates/lib/service/_additionalAnnotations.tpl +++ b/library/common/1.0.0/templates/lib/service/_additionalAnnotations.tpl @@ -8,8 +8,10 @@ rootCtx: The root context of the service {{- $rootCtx := .rootCtx -}} {{- $annotations := .annotations -}} + {{- $sharedKey := include "ix.v1.common.lib.chart.names.fullname" $rootCtx -}} + {{- if $rootCtx.Values.global.addMetalLBAnnotations -}} - {{- $_ := set $annotations "metallb.universe.tf/allow-shared-ip" (include "ix.v1.common.lib.chart.names.fullname" $rootCtx) -}} + {{- $_ := set $annotations "metallb.universe.tf/allow-shared-ip" $sharedKey -}} {{- end -}} {{- end -}}