feat: override helm chart images for init containers (#18834)

Small enhancement to permit usage of different image registries

Co-authored-by: Christian Körner <ck@ps-xaf.de>
This commit is contained in:
ps-xaf 2023-01-02 10:26:15 +01:00 committed by GitHub
parent df876c70fd
commit 72c17fcbf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View File

@ -46,12 +46,20 @@ spec:
initContainers:
{{- if .Values.redis.enabled }}
- name: redis-init-container
image: alpine
{{- if ((.Values.initContainer.redis).image) }}
image: {{ .Values.initContainer.redis.image }}
{{- else }}
image: "alpine"
{{- end }}
command: ['sh', '-c', "apk add redis; until redis-cli -h {{ include "appsmith.fullname" . }}-redis-master.{{.Release.Namespace}}.svc.cluster.local ping; do echo waiting for redis; sleep 2; done"]
{{- end }}
{{- if .Values.mongodb.enabled }}
- name: mongo-init-container
image: docker.io/bitnami/mongodb:4.4.11-debian-10-r12
{{- if ((.Values.initContainer.mongodb).image) }}
image: {{ .Values.initContainer.mongodb.image }}
{{- else }}
image: "docker.io/bitnami/mongodb:4.4.11-debian-10-r12"
{{- end }}
command: ['sh', '-c', "until mongo --host appsmith-mongodb.{{.Release.Namespace}}.svc.cluster.local --eval 'db.runCommand({ping:1})' ; do echo waiting for mongo; sleep 2; done"]
{{- end }}
containers:

View File

@ -12,7 +12,7 @@ mongodb:
nameOverride: appsmith-mongodb
auth:
rootUser: root
rootPassword : password
rootPassword: password
replicaCount: 2
architecture: "replicaset"
replicaSetName: rs0
@ -49,6 +49,14 @@ schedulerName: ""
## It can be set to RollingUpdate or Recreate by default.
##
strategyType: RollingUpdate
##
## Init containers for redis & mongodb
##
initContainer: {}
# redis:
# image: alpine
# mongodb:
# image: docker.io/bitnami/mongodb:4.4.11-debian-10-r12
## Image
##
image: