Skip to content

Commit

Permalink
allow for specifying init containers on all jobs
Browse files Browse the repository at this point in the history
Signed-off-by: David van der Spek <vanderspek.david@gmail.com>
  • Loading branch information
davidspek committed Jun 20, 2023
1 parent f5e1b42 commit 7ae01a3
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ spec:
restartPolicy: Never
securityContext:
{{- toYaml .Values.datahubUpgrade.podSecurityContext | nindent 8 }}
initContainers:
{{- with .Values.datahubUpgrade.extraInitContainers }}
{{- toYaml . | nindent 12 }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: datahub-upgrade-job
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ spec:
restartPolicy: Never
securityContext:
{{- toYaml .Values.datahubSystemUpdate.podSecurityContext | nindent 8 }}
initContainers:
{{- with .Values.datahubSystemUpdate.extraInitContainers }}
{{- toYaml . | nindent 12 }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: datahub-system-update-job
Expand Down
4 changes: 4 additions & 0 deletions charts/datahub/templates/elasticsearch-setup-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
restartPolicy: Never
securityContext:
{{- toYaml .Values.elasticsearchSetupJob.podSecurityContext | nindent 8 }}
{{- with .Values.elasticsearchSetupJob.extraInitContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: elasticsearch-setup-job
image: "{{ .Values.elasticsearchSetupJob.image.repository }}:{{ required "Global or specific tag is required" ( .Values.elasticsearchSetupJob.image.tag | default .Values.global.datahub.version) }}"
Expand Down
4 changes: 4 additions & 0 deletions charts/datahub/templates/kafka-setup-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ spec:
{{- with .Values.kafkaSetupJob.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.kafkaSetupJob.extraInitContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: kafka-setup-job
image: "{{ .Values.kafkaSetupJob.image.repository }}:{{ required "Global or specific tag is required" ( .Values.kafkaSetupJob.image.tag | default .Values.global.datahub.version) }}"
Expand Down
4 changes: 4 additions & 0 deletions charts/datahub/templates/mysql-setup-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
restartPolicy: Never
securityContext:
{{- toYaml .Values.mysqlSetupJob.podSecurityContext | nindent 8 }}
{{- with .Values.mysqlSetupJob.extraInitContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: mysql-setup-job
image: "{{ .Values.mysqlSetupJob.image.repository }}:{{ required "Global or specific tag is required" ( .Values.mysqlSetupJob.image.tag | default .Values.global.datahub.version) }}"
Expand Down
4 changes: 4 additions & 0 deletions charts/datahub/templates/postgresql-setup-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
restartPolicy: Never
securityContext:
{{- toYaml .Values.postgresqlSetupJob.podSecurityContext | nindent 8 }}
{{- with .Values.postgresqlSetupJob.extraInitContainers }}
initContainers:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: postgresql-setup-job
image: "{{ .Values.postgresqlSetupJob.image.repository }}:{{ required "Global or specific tag is required" (.Values.postgresqlSetupJob.image.tag | default .Values.global.datahub.version) }}"
Expand Down
6 changes: 6 additions & 0 deletions charts/datahub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ elasticsearchSetupJob:
requests:
cpu: 300m
memory: 256Mi
extraInitContainers: []
podSecurityContext:
fsGroup: 1000
securityContext:
Expand Down Expand Up @@ -125,6 +126,7 @@ kafkaSetupJob:
requests:
cpu: 300m
memory: 768Mi
extraInitContainers: []
podSecurityContext:
fsGroup: 1000
securityContext:
Expand Down Expand Up @@ -154,6 +156,7 @@ mysqlSetupJob:
requests:
cpu: 300m
memory: 256Mi
extraInitContainers: []
podSecurityContext:
fsGroup: 1000
securityContext:
Expand Down Expand Up @@ -188,6 +191,7 @@ postgresqlSetupJob:
requests:
cpu: 300m
memory: 256Mi
extraInitContainers: []
podSecurityContext:
fsGroup: 1000
securityContext:
Expand Down Expand Up @@ -271,6 +275,7 @@ datahubUpgrade:
# extraEnvs:
# - name: "DATAHUB_DB_NAME"
# value: "dh"
extraInitContainers: []

## Runs system update processes
## Includes: Elasticsearch Indices Creation/Reindex (See global.elasticsearch.index for additional configuration)
Expand Down Expand Up @@ -301,6 +306,7 @@ datahubSystemUpdate:
# - name: my-image-name
# image: my-image
# imagePullPolicy: Always
extraInitContainers: []

global:
strict_mode: true
Expand Down

0 comments on commit 7ae01a3

Please sign in to comment.