Skip to content

Commit 7d30193

Browse files
authored
add securityContext on Pod level, and to backend initContainers (#2678)
1 parent 327c9c0 commit 7d30193

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

deployment/helm_chart/opik/templates/deployment.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,18 @@ spec:
4040
imagePullSecrets:
4141
{{- toYaml . | nindent 8 }}
4242
{{- end }}
43+
{{- with $value.podSecurityContext }}
44+
securityContext:
45+
{{- toYaml . | nindent 10 }}
46+
{{- end }}
4347
{{- if or $value.initContainers $value.waitForClickhouse $value.run_migration }}
4448
initContainers:
4549
{{- if and (eq $key "backend") $value.waitForClickhouse }}
4650
- name: wait-for-clickhouse-service
4751
image: "{{ default $.Values.registry $value.waitForClickhouse.image.registry }}/{{ $value.waitForClickhouse.image.repository }}:{{ $value.waitForClickhouse.image.tag }}"
4852
imagePullPolicy: {{ default $value.image.pullPolicy $value.waitForClickhouse.image.pullPolicy }}
53+
securityContext:
54+
{{- toYaml $value.securityContext | nindent 12 }}
4955
command: ["/bin/sh", "-c"]
5056
args:
5157
- |
@@ -59,6 +65,8 @@ spec:
5965
- name: backend-migrations
6066
image: "{{ $.Values.registry }}/{{ $value.image.repository }}:{{ $value.image.tag }}"
6167
imagePullPolicy: {{ $value.image.pullPolicy }}
68+
securityContext:
69+
{{- toYaml $value.securityContext | nindent 12 }}
6270
command: ["./run_db_migrations.sh"]
6371
{{- with $value.envFrom }}
6472
envFrom:

0 commit comments

Comments
 (0)