Skip to content

Commit

Permalink
feat: added securityContext on all initContainers
Browse files Browse the repository at this point in the history
  • Loading branch information
pogossian committed Jul 17, 2023
1 parent 8f6c1fb commit 1873c9e
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/netris-controller/templates/equinix-metal-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/netris-controller/templates/grpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/netris-controller/templates/migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions charts/netris-controller/templates/phoenixnap-bmc-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/netris-controller/templates/telescope-notifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions charts/netris-controller/templates/telescope.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/netris-controller/templates/web-service-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/netris-controller/templates/web-service-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/netris-controller/templates/web-session-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

1 comment on commit 1873c9e

@ar4mirez
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pogossian this is awesome! Thank you

Please sign in to comment.