From 1873c9efef975351d3585f3d45f3f3ba500072c6 Mon Sep 17 00:00:00 2001 From: Gor Poghosyan Date: Mon, 17 Jul 2023 23:50:22 +0400 Subject: [PATCH] feat: added securityContext on all initContainers --- charts/netris-controller/templates/equinix-metal-agent.yaml | 4 ++++ charts/netris-controller/templates/grpc.yaml | 2 ++ charts/netris-controller/templates/migration.yaml | 2 ++ charts/netris-controller/templates/phoenixnap-bmc-agent.yaml | 4 ++++ charts/netris-controller/templates/telescope-notifier.yaml | 2 ++ charts/netris-controller/templates/telescope.yaml | 4 ++++ charts/netris-controller/templates/web-service-backend.yaml | 2 ++ charts/netris-controller/templates/web-service-frontend.yaml | 2 ++ charts/netris-controller/templates/web-session-generator.yaml | 2 ++ 9 files changed, 24 insertions(+) diff --git a/charts/netris-controller/templates/equinix-metal-agent.yaml b/charts/netris-controller/templates/equinix-metal-agent.yaml index 0a7a446..25cd2fb 100644 --- a/charts/netris-controller/templates/equinix-metal-agent.yaml +++ b/charts/netris-controller/templates/equinix-metal-agent.yaml @@ -30,12 +30,16 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-webapp + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh - -c - for i in $(seq 1 200); do nc -z -w3 {{ printf "%s-%s" (include "netris-controller.fullname" .) "web-service-backend" }} {{ (index .Values "web-service-backend").service.port }} && exit 0 || sleep 3; done; exit 1 - name: init-wait-websession + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh diff --git a/charts/netris-controller/templates/grpc.yaml b/charts/netris-controller/templates/grpc.yaml index c7c1752..1b61d85 100644 --- a/charts/netris-controller/templates/grpc.yaml +++ b/charts/netris-controller/templates/grpc.yaml @@ -32,6 +32,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-mariadb + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh diff --git a/charts/netris-controller/templates/migration.yaml b/charts/netris-controller/templates/migration.yaml index 4503847..486cad2 100644 --- a/charts/netris-controller/templates/migration.yaml +++ b/charts/netris-controller/templates/migration.yaml @@ -32,6 +32,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-mariadb + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh diff --git a/charts/netris-controller/templates/phoenixnap-bmc-agent.yaml b/charts/netris-controller/templates/phoenixnap-bmc-agent.yaml index 70c65c2..606ac6b 100644 --- a/charts/netris-controller/templates/phoenixnap-bmc-agent.yaml +++ b/charts/netris-controller/templates/phoenixnap-bmc-agent.yaml @@ -30,12 +30,16 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-webapp + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh - -c - for i in $(seq 1 200); do nc -z -w3 {{ printf "%s-%s" (include "netris-controller.fullname" .) "web-service-backend" }} {{ (index .Values "web-service-backend").service.port }} && exit 0 || sleep 3; done; exit 1 - name: init-wait-websession + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh diff --git a/charts/netris-controller/templates/telescope-notifier.yaml b/charts/netris-controller/templates/telescope-notifier.yaml index 4337a8b..81bb087 100644 --- a/charts/netris-controller/templates/telescope-notifier.yaml +++ b/charts/netris-controller/templates/telescope-notifier.yaml @@ -32,6 +32,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-mariadb + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh diff --git a/charts/netris-controller/templates/telescope.yaml b/charts/netris-controller/templates/telescope.yaml index 5957a42..9a9c22a 100644 --- a/charts/netris-controller/templates/telescope.yaml +++ b/charts/netris-controller/templates/telescope.yaml @@ -32,12 +32,16 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-mariadb + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh - -c - for i in $(seq 1 200); do nc -z -w3 {{ printf "%s-%s" (include "netris-controller.fullname" .) "mariadb" }} {{ .Values.mariadb.primary.service.port }} && exit 0 || sleep 3; done; exit 1 - name: init-wait-grpc + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh diff --git a/charts/netris-controller/templates/web-service-backend.yaml b/charts/netris-controller/templates/web-service-backend.yaml index a4955f7..96b0bcd 100644 --- a/charts/netris-controller/templates/web-service-backend.yaml +++ b/charts/netris-controller/templates/web-service-backend.yaml @@ -32,6 +32,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-mariadb + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh diff --git a/charts/netris-controller/templates/web-service-frontend.yaml b/charts/netris-controller/templates/web-service-frontend.yaml index 30be095..2a9c461 100644 --- a/charts/netris-controller/templates/web-service-frontend.yaml +++ b/charts/netris-controller/templates/web-service-frontend.yaml @@ -32,6 +32,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-backend + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh diff --git a/charts/netris-controller/templates/web-session-generator.yaml b/charts/netris-controller/templates/web-session-generator.yaml index c48d866..88c18c9 100644 --- a/charts/netris-controller/templates/web-session-generator.yaml +++ b/charts/netris-controller/templates/web-session-generator.yaml @@ -32,6 +32,8 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} initContainers: - name: init-wait-mariadb + securityContext: + {{- toYaml .Values.securityContext | nindent 10 }} image: alpine:3.11 command: - sh