From 3f8e9a567aa500c707dd024676cc3f6b721e0c71 Mon Sep 17 00:00:00 2001 From: Gabriel Forien Date: Thu, 22 Sep 2022 16:47:12 +0200 Subject: [PATCH] feat(helm): add RollingUpdate parameters (#20931) Co-authored-by: gforien --- helm/superset/Chart.yaml | 2 +- helm/superset/templates/deployment-worker.yaml | 4 ++++ helm/superset/templates/deployment.yaml | 4 ++++ helm/superset/values.schema.json | 6 ++++++ helm/superset/values.yaml | 12 ++++++++++++ 5 files changed, 27 insertions(+), 1 deletion(-) diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml index 10e4fadd4..ef017b70f 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.7.3 +version: 0.7.4 dependencies: - name: postgresql version: 11.1.22 diff --git a/helm/superset/templates/deployment-worker.yaml b/helm/superset/templates/deployment-worker.yaml index 71f90ace4..7d79f2edb 100644 --- a/helm/superset/templates/deployment-worker.yaml +++ b/helm/superset/templates/deployment-worker.yaml @@ -33,6 +33,10 @@ spec: matchLabels: app: {{ template "superset.name" . }}-worker release: {{ .Release.Name }} + {{- if .Values.supersetWorker.strategy }} + strategy: + {{- toYaml .Values.supersetWorker.strategy | nindent 4 }} + {{- end }} template: metadata: annotations: diff --git a/helm/superset/templates/deployment.yaml b/helm/superset/templates/deployment.yaml index 7c3bdac6d..3388fcc72 100644 --- a/helm/superset/templates/deployment.yaml +++ b/helm/superset/templates/deployment.yaml @@ -29,6 +29,10 @@ metadata: {{- end }} spec: replicas: {{ .Values.supersetNode.replicaCount }} + {{- if .Values.supersetNode.strategy }} + strategy: + {{- toYaml .Values.supersetNode.strategy | nindent 4 }} + {{- end }} selector: matchLabels: app: {{ template "superset.name" . }} diff --git a/helm/superset/values.schema.json b/helm/superset/values.schema.json index d554cbcc3..40edb991d 100644 --- a/helm/superset/values.schema.json +++ b/helm/superset/values.schema.json @@ -343,6 +343,9 @@ }, "containerSecurityContext": { "type": "object" + }, + "strategy": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.DeploymentStrategy" } }, "required": [ @@ -386,6 +389,9 @@ }, "containerSecurityContext": { "type": "object" + }, + "strategy": { + "$ref": "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.23.0/_definitions.json##/definitions/io.k8s.api.apps.v1.DeploymentStrategy" } }, "required": [ diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml index df9333644..00a091622 100644 --- a/helm/superset/values.yaml +++ b/helm/superset/values.yaml @@ -289,6 +289,12 @@ supersetNode: # memory: 128Mi podSecurityContext: {} containerSecurityContext: {} + strategy: {} + # type: RollingUpdate + # rollingUpdate: + # maxSurge: 25% + # maxUnavailable: 25% + ## ## Superset worker configuration supersetWorker: @@ -322,6 +328,12 @@ supersetWorker: # memory: 128Mi podSecurityContext: {} containerSecurityContext: {} + strategy: {} + # type: RollingUpdate + # rollingUpdate: + # maxSurge: 25% + # maxUnavailable: 25% + ## ## Superset beat configuration (to trigger scheduled jobs like reports) supersetCeleryBeat: