diff options
Diffstat (limited to 'kubernetes/common')
-rwxr-xr-x | kubernetes/common/cert-wrapper/resources/import-custom-certs.sh | 4 | ||||
-rw-r--r-- | kubernetes/common/common/templates/_service.tpl | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh b/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh index cb4153e778..6df7505e7b 100755 --- a/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh +++ b/kubernetes/common/cert-wrapper/resources/import-custom-certs.sh @@ -1,7 +1,7 @@ -#!/bin/bash +#!/bin/sh {{/* -# Copyright © 2020 Bell Canada +# Copyright © 2020-2021 Bell Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/kubernetes/common/common/templates/_service.tpl b/kubernetes/common/common/templates/_service.tpl index 9c3010c209..8489cc5021 100644 --- a/kubernetes/common/common/templates/_service.tpl +++ b/kubernetes/common/common/templates/_service.tpl @@ -181,6 +181,8 @@ labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent {{- $labels := default (dict) .labels -}} {{- $matchLabels := default (dict) .matchLabels -}} {{- $sessionAffinity := default "None" $dot.Values.service.sessionAffinity -}} +{{- $kubeTargetVersion := default $dot.Capabilities.KubeVersion.Version | trimPrefix "v" -}} +{{- $ipFamilyPolicy := default "PreferDualStack" $dot.Values.service.ipFamilyPolicy -}} apiVersion: v1 kind: Service metadata: {{ include "common.serviceMetadata" (dict "suffix" $suffix "annotations" $annotations "msb_informations" $msb_informations "labels" $labels "dot" $dot) | nindent 2 }} @@ -189,6 +191,9 @@ spec: clusterIP: None {{- end }} ports: {{- include "common.servicePorts" (dict "serviceType" $serviceType "ports" $ports "dot" $dot "add_plain_port" $add_plain_port) | nindent 4 }} + {{- if semverCompare ">=1.20.0" $kubeTargetVersion }} + ipFamilyPolicy: {{ $ipFamilyPolicy }} + {{- end }} {{- if $publishNotReadyAddresses }} publishNotReadyAddresses: true {{- end }} |