Skip to content

Commit 40e404c

Browse files
committed
Add securityContext for individual containers in flyte-binary Deployment
Signed-off-by: marrrcin <m.zablo@gmail.com>
1 parent 7f124ab commit 40e404c

File tree

6 files changed

+24
-6
lines changed

6 files changed

+24
-6
lines changed

charts/flyte-binary/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ Chart for basic single Flyte executable deployment
9191
| deployment.extraVolumes | list | `[]` | |
9292
| deployment.genAdminAuthSecret.args | list | `[]` | |
9393
| deployment.genAdminAuthSecret.command | list | `[]` | |
94+
| deployment.genAdminAuthSecret.securityContext | object | `{}` | |
9495
| deployment.image.pullPolicy | string | `"IfNotPresent"` | |
9596
| deployment.image.repository | string | `"cr.flyte.org/flyteorg/flyte-binary"` | |
9697
| deployment.image.tag | string | `"latest"` | |
@@ -105,13 +106,15 @@ Chart for basic single Flyte executable deployment
105106
| deployment.podSecurityContext.runAsGroup | int | `65534` | |
106107
| deployment.podSecurityContext.runAsUser | int | `65534` | |
107108
| deployment.readinessProbe | object | `{}` | |
109+
| deployment.securityContext | object | `{}` | |
108110
| deployment.sidecars | list | `[]` | |
109111
| deployment.startupProbe | object | `{}` | |
110112
| deployment.waitForDB.args | list | `[]` | |
111113
| deployment.waitForDB.command | list | `[]` | |
112114
| deployment.waitForDB.image.pullPolicy | string | `"IfNotPresent"` | |
113115
| deployment.waitForDB.image.repository | string | `"postgres"` | |
114116
| deployment.waitForDB.image.tag | string | `"15-alpine"` | |
117+
| deployment.waitForDB.securityContext | object | `{}` | |
115118
| enabled_plugins.tasks | object | `{"task-plugins":{"default-for-task-types":{"container":"container","container_array":"k8s-array","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array","agent-service","echo"]}}` | Tasks specific configuration [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#GetConfig) |
116119
| enabled_plugins.tasks.task-plugins | object | `{"default-for-task-types":{"container":"container","container_array":"k8s-array","sidecar":"sidecar"},"enabled-plugins":["container","sidecar","k8s-array","agent-service","echo"]}` | Plugins configuration, [structure](https://pkg.go.dev/github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config#TaskPluginConfig) |
117120
| enabled_plugins.tasks.task-plugins.enabled-plugins | list | `["container","sidecar","k8s-array","agent-service","echo"]` | [Enabled Plugins](https://pkg.go.dev/github.com/lyft/flyteplugins/go/tasks/config#Config). Enable sagemaker*, athena if you install the backend plugins |

charts/flyte-binary/templates/deployment.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ spec:
9494
{{- if .Values.deployment.resources }}
9595
resources: {{- toYaml .Values.deployment.resources | nindent 12 }}
9696
{{- end }}
97+
{{- if .Values.deployment.waitForDB.securityContext }}
98+
securityContext: {{- toYaml .Values.deployment.waitForDB.securityContext | nindent 12 }}
99+
{{- end }}
97100
{{- end }}
98101
{{- if .Values.configuration.auth.enabled }}
99102
- name: gen-admin-auth-secret
@@ -131,6 +134,9 @@ spec:
131134
{{- if .Values.deployment.resources }}
132135
resources: {{- toYaml .Values.deployment.resources | nindent 12 }}
133136
{{- end }}
137+
{{- if .Values.deployment.genAdminAuthSecret.securityContext }}
138+
securityContext: {{- toYaml .Values.deployment.genAdminAuthSecret.securityContext | nindent 12 }}
139+
{{- end }}
134140
{{- end }}
135141
{{- if .Values.deployment.initContainers }}
136142
{{- tpl ( .Values.deployment.initContainers | toYaml ) . | nindent 8 }}
@@ -224,6 +230,9 @@ spec:
224230
{{- if .Values.deployment.extraVolumeMounts }}
225231
{{- tpl ( .Values.deployment.extraVolumeMounts | toYaml ) . | nindent 12 }}
226232
{{- end }}
233+
{{- if .Values.deployment.securityContext }}
234+
securityContext: {{- toYaml .Values.deployment.securityContext | nindent 12 }}
235+
{{- end }}
227236
{{- if .Values.deployment.sidecars }}
228237
{{- tpl ( .Values.deployment.sidecars | toYaml ) . | nindent 8 }}
229238
{{- end }}

charts/flyte-binary/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,16 @@ deployment:
275275
command: []
276276
# args Override default init container args
277277
args: []
278+
# securityContext Specify security context for wait-for-db init container
279+
securityContext: {}
278280
# genAdminAuthSecret Configure init container to generate secrets for internal use
279281
genAdminAuthSecret:
280282
# command Override default init container command
281283
command: []
282284
# args Override default init container args
283285
args: []
286+
# securityContext Specify security context for gen-admin-auth-secret init container
287+
securityContext: {}
284288
# labels Add labels to Flyte deployment
285289
labels: {}
286290
# annotations Add annotations to Flyte deployment
@@ -300,6 +304,8 @@ deployment:
300304
# extraPodSpec Specify additional configuration for Flyte pod
301305
# This can be used for adding affinity, tolerations, hostNetwork, etc.
302306
extraPodSpec: {}
307+
# securityContext Specify security context for Flyte container
308+
securityContext: {}
303309

304310
# service Configure service for Flyte
305311
service:

docker/sandbox-bundled/manifests/complete-agent.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ type: Opaque
823823
---
824824
apiVersion: v1
825825
data:
826-
haSharedSecret: VFRKYXBKM2xsTERQb1ZDaQ==
826+
haSharedSecret: UnZJZHEzUExzbkJsOW1wYw==
827827
proxyPassword: ""
828828
proxyUsername: ""
829829
kind: Secret
@@ -1420,7 +1420,7 @@ spec:
14201420
metadata:
14211421
annotations:
14221422
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
1423-
checksum/secret: 4c7bc4fbd20227034bda9ead9cd941c94879028d6920b98113f9a08ef3c6f9d9
1423+
checksum/secret: ce172103045f4215e361b4c109776a78fe06660a4ade01c7351ea07212e7cfb9
14241424
labels:
14251425
app: docker-registry
14261426
release: flyte-sandbox

docker/sandbox-bundled/manifests/complete.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ type: Opaque
805805
---
806806
apiVersion: v1
807807
data:
808-
haSharedSecret: Zm4xWHVaRlNsb2EyVFFIVg==
808+
haSharedSecret: dDFiem04NjFzb29ZWHFtNA==
809809
proxyPassword: ""
810810
proxyUsername: ""
811811
kind: Secret
@@ -1369,7 +1369,7 @@ spec:
13691369
metadata:
13701370
annotations:
13711371
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
1372-
checksum/secret: fdbda8db15a09ca5943cc534a824402836c98722de81d1631c45099a8e04b043
1372+
checksum/secret: 529d34a9c4d3c82b9eec5028fcc30f26e923fa77a57eb29c4705d28c85355963
13731373
labels:
13741374
app: docker-registry
13751375
release: flyte-sandbox

docker/sandbox-bundled/manifests/dev.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ metadata:
499499
---
500500
apiVersion: v1
501501
data:
502-
haSharedSecret: RjY3OEtOeFVDMjFabkI0SA==
502+
haSharedSecret: Y1V1RU03eGVhUDFFc1pSdQ==
503503
proxyPassword: ""
504504
proxyUsername: ""
505505
kind: Secret
@@ -934,7 +934,7 @@ spec:
934934
metadata:
935935
annotations:
936936
checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81
937-
checksum/secret: 6ab17d37fe9743709a5aa2a140c06a7a25fe33cfe4d6c0cbcb2ddf0a2dcf1675
937+
checksum/secret: 66507f448be8010226a1ad2c741fb2866ef4372b68e61287c7500b47fae05572
938938
labels:
939939
app: docker-registry
940940
release: flyte-sandbox

0 commit comments

Comments
 (0)