Skip to content

Commit

Permalink
Add containerSecurityContexts to all initContainers
Browse files Browse the repository at this point in the history
  • Loading branch information
hikhvar committed Sep 24, 2024
1 parent ef7ec10 commit 69210ff
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions charts/temporal/templates/server-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ spec:
- name: check-cassandra-service
image: busybox
command: ['sh', '-c', 'until nc -z {{ include "cassandra.host" $ }} {{ $.Values.cassandra.config.ports.cql }}; do echo waiting for cassandra service; sleep 1; done;']
{{- with $.Values.schema.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
- name: check-cassandra
image: "{{ $.Values.cassandra.image.repo }}:{{ $.Values.cassandra.image.tag }}"
imagePullPolicy: {{ $.Values.cassandra.image.pullPolicy }}
command: ['sh', '-c', 'until cqlsh {{ include "cassandra.host" $ }} {{ $.Values.cassandra.config.ports.cql }} -e "SHOW VERSION"; do echo waiting for cassandra to start; sleep 1; done;']
{{- with $.Values.schema.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if or $.Values.elasticsearch.enabled }}
- name: check-elasticsearch
Expand All @@ -33,6 +41,10 @@ spec:
command: ['sh', '-c', 'until curl --silent --fail --user "$ES_USER:$ES_PWD" $ES_SCHEME://$ES_HOST:$ES_PORT 2>&1 > /dev/null; do echo waiting for elasticsearch to start; sleep 1; done;']
env:
{{- include "temporal.admintools-env" (list $ "visibility") | nindent 12 }}
{{- with $.Values.schema.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- if $.Values.schema.createDatabase.enabled }}
{{- range $store := (list "default" "visibility") }}
Expand All @@ -53,6 +65,10 @@ spec:
volumeMounts:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with $.Values.schema.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down

0 comments on commit 69210ff

Please sign in to comment.