Skip to content

Commit aaea597

Browse files
habc12hashhar
authored andcommitted
Support for init worker/coordinator init containers
Support for init worker/coordinator init containers
1 parent 183e60a commit aaea597

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

charts/trino/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The following table lists the configurable parameters of the Trino chart and the
3939
| `additionalExchangeManagerProperties` | | `{}` |
4040
| `additionalCatalogs` | | `{}` |
4141
| `env` | | `[]` |
42+
| `initContainers` | | `{}` |
4243
| `securityContext.runAsUser` | | `1000` |
4344
| `securityContext.runAsGroup` | | `1000` |
4445
| `service.type` | | `"ClusterIP"` |

charts/trino/templates/deployment-coordinator.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ spec:
3333
- name: catalog-volume
3434
configMap:
3535
name: {{ template "trino.catalog" . }}
36+
{{- if .Values.initContainers.coordinator }}
37+
initContainers:
38+
{{- tpl (toYaml .Values.initContainers.coordinator) . | nindent 6 }}
39+
{{- end }}
3640
imagePullSecrets:
3741
- name: registry-credentials
3842
containers:

charts/trino/templates/deployment-worker.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ spec:
3030
- name: catalog-volume
3131
configMap:
3232
name: {{ template "trino.catalog" . }}
33+
{{- if .Values.initContainers.worker }}
34+
initContainers:
35+
{{- tpl (toYaml .Values.initContainers.worker) . | nindent 6 }}
36+
{{- end }}
3337
imagePullSecrets:
3438
- name: registry-credentials
3539
containers:

charts/trino/values.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,17 @@ additionalCatalogs: {}
5555
# Array of EnvVar (https://v1-18.docs.kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envvar-v1-core)
5656
env: []
5757

58+
initContainers: {}
59+
# coordinator:
60+
# - name: init-coordinator
61+
# image: busybox:1.28
62+
# imagePullPolicy: IfNotPresent
63+
# command: ['sh', '-c', "until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"]
64+
# worker:
65+
# - name: init-worker
66+
# image: busybox:1.28
67+
# command: ['sh', '-c', 'echo The worker is running! && sleep 3600']
68+
5869
securityContext:
5970
runAsUser: 1000
6071
runAsGroup: 1000

0 commit comments

Comments
 (0)