From 2abad75461c8d31ad083d3ed1082257cc5d96662 Mon Sep 17 00:00:00 2001 From: Simon L Date: Mon, 13 Nov 2023 14:24:13 +0100 Subject: [PATCH] helm chart - add dualstack functionality Signed-off-by: Simon L --- .../templates/nextcloud-aio-apache-service.yaml | 1 + .../templates/nextcloud-aio-clamav-service.yaml | 1 + .../templates/nextcloud-aio-collabora-service.yaml | 1 + .../templates/nextcloud-aio-database-service.yaml | 1 + .../templates/nextcloud-aio-fulltextsearch-service.yaml | 1 + .../templates/nextcloud-aio-imaginary-service.yaml | 1 + .../templates/nextcloud-aio-nextcloud-service.yaml | 1 + .../templates/nextcloud-aio-notify-push-service.yaml | 1 + .../templates/nextcloud-aio-onlyoffice-service.yaml | 1 + .../templates/nextcloud-aio-redis-service.yaml | 1 + .../templates/nextcloud-aio-talk-recording-service.yaml | 1 + .../templates/nextcloud-aio-talk-service.yaml | 2 ++ nextcloud-aio-helm-chart/update-helm.sh | 2 ++ 13 files changed, 15 insertions(+) diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-service.yaml index a3b64e40..47c36b71 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-apache-service.yaml @@ -9,6 +9,7 @@ metadata: name: nextcloud-aio-apache namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack type: LoadBalancer externalTrafficPolicy: Local ports: diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-service.yaml index ade35504..4683278b 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-clamav-service.yaml @@ -10,6 +10,7 @@ metadata: name: nextcloud-aio-clamav namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "3310" port: 3310 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-collabora-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-collabora-service.yaml index a1cf6fd4..6307dc4f 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-collabora-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-collabora-service.yaml @@ -10,6 +10,7 @@ metadata: name: nextcloud-aio-collabora namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "9980" port: 9980 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-service.yaml index adb61d66..e770011b 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-database-service.yaml @@ -9,6 +9,7 @@ metadata: name: nextcloud-aio-database namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "5432" port: 5432 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-service.yaml index f5ea3428..6e66b639 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-fulltextsearch-service.yaml @@ -10,6 +10,7 @@ metadata: name: nextcloud-aio-fulltextsearch namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "9200" port: 9200 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-imaginary-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-imaginary-service.yaml index ac51f3d7..182d0460 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-imaginary-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-imaginary-service.yaml @@ -10,6 +10,7 @@ metadata: name: nextcloud-aio-imaginary namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "9000" port: 9000 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-service.yaml index fba99885..48ca483b 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-nextcloud-service.yaml @@ -9,6 +9,7 @@ metadata: name: nextcloud-aio-nextcloud namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "9000" port: 9000 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-service.yaml index d12943cd..fee9d10b 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-notify-push-service.yaml @@ -9,6 +9,7 @@ metadata: name: nextcloud-aio-notify-push namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "7867" port: 7867 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-service.yaml index 2e005ddc..af10c7cf 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-onlyoffice-service.yaml @@ -10,6 +10,7 @@ metadata: name: nextcloud-aio-onlyoffice namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "80" port: 80 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-service.yaml index f65e7455..508b0c75 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-redis-service.yaml @@ -9,6 +9,7 @@ metadata: name: nextcloud-aio-redis namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "6379" port: 6379 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-recording-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-recording-service.yaml index 403e2e5a..d307c573 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-recording-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-recording-service.yaml @@ -10,6 +10,7 @@ metadata: name: nextcloud-aio-talk-recording namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "1234" port: 1234 diff --git a/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-service.yaml b/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-service.yaml index 66a63499..9d87d9ee 100755 --- a/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-service.yaml +++ b/nextcloud-aio-helm-chart/templates/nextcloud-aio-talk-service.yaml @@ -11,6 +11,7 @@ metadata: name: nextcloud-aio-talk-public namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack type: LoadBalancer externalTrafficPolicy: Local ports: @@ -35,6 +36,7 @@ metadata: name: nextcloud-aio-talk namespace: {{ .Values.NAMESPACE }} spec: + ipFamilyPolicy: PreferDualStack ports: - name: "8081" port: 8081 diff --git a/nextcloud-aio-helm-chart/update-helm.sh b/nextcloud-aio-helm-chart/update-helm.sh index 954cf728..a5b67a3c 100755 --- a/nextcloud-aio-helm-chart/update-helm.sh +++ b/nextcloud-aio-helm-chart/update-helm.sh @@ -168,6 +168,8 @@ find ./ -name '*talk-service.yaml' -exec mv /tmp/talk-service.copy \{} \; # shellcheck disable=SC1083 find ./ -name '*service.yaml' -exec sed -i "/type: LoadBalancer/a\ \ externalTrafficPolicy: Local" \{} \; # shellcheck disable=SC1083 +find ./ -name '*service.yaml' -exec sed -i "/^spec:/a\ \ ipFamilyPolicy: PreferDualStack" \{} \; +# shellcheck disable=SC1083 find ./ -name '*.yaml' -exec sed -i "s|'{{|\"{{|g;s|}}'|}}\"|g" \{} \; # shellcheck disable=SC1083 find ./ -name '*.yaml' -exec sed -i "/type: Recreate/d" \{} \;