diff --git a/library/common-test/tests/service/metadata_test.yaml b/library/common-test/tests/service/metadata_test.yaml index e53e3b4e68..5f24bde0ea 100644 --- a/library/common-test/tests/service/metadata_test.yaml +++ b/library/common-test/tests/service/metadata_test.yaml @@ -70,6 +70,7 @@ tests: global: addMetalLBAnnotations: true addTraefikAnnotations: true + proto: HTTPS service: my-service1: enabled: true @@ -79,7 +80,7 @@ tests: port-name: enabled: true primary: true - protocol: HTTPS + protocol: "{{ .Values.proto }}" port: 12345 workload: my-workload: diff --git a/library/common/1.0.0/templates/class/_service.tpl b/library/common/1.0.0/templates/class/_service.tpl index 31545a9515..5c6d59b8cb 100644 --- a/library/common/1.0.0/templates/class/_service.tpl +++ b/library/common/1.0.0/templates/class/_service.tpl @@ -30,7 +30,7 @@ objectData: The service data, that will be used to render the Service object. {{- range $portName, $port := $objectData.ports -}} {{- if $port.enabled -}} - {{- if eq ($port.protocol | default "") "HTTPS" -}} + {{- if eq (tpl ($port.protocol | default "") $rootCtx) "HTTPS" -}} {{- $hasHTTPSPort = true -}} {{- end -}} diff --git a/library/common/1.0.0/templates/lib/workload/_pod.tpl b/library/common/1.0.0/templates/lib/workload/_pod.tpl index 2930f11fea..f6d040880a 100644 --- a/library/common/1.0.0/templates/lib/workload/_pod.tpl +++ b/library/common/1.0.0/templates/lib/workload/_pod.tpl @@ -57,6 +57,8 @@ containers: {{- $_ := set $container "name" $name -}} {{- $_ := set $container "shortName" $containerName -}} + {{- $_ := set $container "podShortName" $objectData.shortName -}} + {{- $_ := set $container "podPrimary" $objectData.primary -}} {{- include "ix.v1.common.lib.pod.container" (dict "rootCtx" $rootCtx "objectData" $container) | trim | nindent 2 }} {{- end -}} {{- end -}}