diff options
Diffstat (limited to 'kubernetes/common')
-rw-r--r-- | kubernetes/common/cassandra/resources/restore.sh | 2 | ||||
-rwxr-xr-x | kubernetes/common/cert-wrapper/resources/import-custom-certs.sh | 4 | ||||
-rw-r--r-- | kubernetes/common/common/templates/_service.tpl | 5 |
3 files changed, 8 insertions, 3 deletions
diff --git a/kubernetes/common/cassandra/resources/restore.sh b/kubernetes/common/cassandra/resources/restore.sh index a8105345f7..7f271d262f 100644 --- a/kubernetes/common/cassandra/resources/restore.sh +++ b/kubernetes/common/cassandra/resources/restore.sh @@ -41,7 +41,7 @@ then print_usage fi -while [[ $# -gt 0 ]] +while [ $# -gt 0 ] do key="$1" shift 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 }} |