From 4db70b5c18fc7d66ae05bfa24badf7659d4319d7 Mon Sep 17 00:00:00 2001 From: Andrii Vakarev <745407+avakarev@users.noreply.github.com> Date: Thu, 10 Feb 2022 18:43:58 +0100 Subject: [PATCH] feat(helm): allow to customize init image (#18649) * feat(helm): allow to customize init image * chore(helm): bump chart version to 0.5.8 --- helm/superset/Chart.yaml | 2 +- helm/superset/values.schema.json | 20 ++++++++++++++++++++ helm/superset/values.yaml | 20 ++++++++++++-------- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 3e9bda1dcf7b3..fc6be3ffd0010 100644 --- a/helm/superset/Chart.yaml +++ b/helm/superset/Chart.yaml @@ -22,7 +22,7 @@ maintainers: - name: craig-rueda email: craig@craigrueda.com url: https://github.com/craig-rueda -version: 0.5.7 +version: 0.5.8 dependencies: - name: postgresql version: 10.2.0 diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json index 431dfb36d79f4..dd29358784b8e 100644 --- a/helm/superset/values.schema.json +++ b/helm/superset/values.schema.json @@ -111,6 +111,26 @@ "imagePullSecrets": { "type": "array" }, + "initImage": { + "type": "object", + "additionalProperties": false, + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + }, + "pullPolicy": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.core.v1.Container/properties/imagePullPolicy" + } + }, + "required": [ + "repository", + "tag", + "pullPolicy" + ] + }, "service": { "type": "object", "additionalProperties": false, diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index a30323f823aa7..e77cc51c9fa28 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -165,6 +165,10 @@ image: imagePullSecrets: [] +initImage: + repository: busybox + tag: latest + pullPolicy: IfNotPresent service: type: ClusterIP @@ -231,8 +235,8 @@ supersetNode: forceReload: false # If true, forces deployment to reload on each upgrade initContainers: - name: wait-for-postgres - image: busybox:latest - imagePullPolicy: IfNotPresent + image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}" + imagePullPolicy: "{{ .Values.initImage.pullPolicy }}" envFrom: - secretRef: name: '{{ tpl .Values.envFromSecret . }}' @@ -252,8 +256,8 @@ supersetWorker: forceReload: false # If true, forces deployment to reload on each upgrade initContainers: - name: wait-for-postgres - image: busybox:latest - imagePullPolicy: IfNotPresent + image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}" + imagePullPolicy: "{{ .Values.initImage.pullPolicy }}" envFrom: - secretRef: name: '{{ tpl .Values.envFromSecret . }}' @@ -275,8 +279,8 @@ supersetCeleryBeat: forceReload: false # If true, forces deployment to reload on each upgrade initContainers: - name: wait-for-postgres - image: busybox:latest - imagePullPolicy: IfNotPresent + image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}" + imagePullPolicy: "{{ .Values.initImage.pullPolicy }}" envFrom: - secretRef: name: '{{ tpl .Values.envFromSecret . }}' @@ -314,8 +318,8 @@ init: password: admin initContainers: - name: wait-for-postgres - image: busybox:latest - imagePullPolicy: IfNotPresent + image: "{{ .Values.initImage.repository }}:{{ .Values.initImage.tag }}" + imagePullPolicy: "{{ .Values.initImage.pullPolicy }}" envFrom: - secretRef: name: '{{ tpl .Values.envFromSecret . }}'