You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by cr...@apache.org on 2024/02/20 23:52:01 UTC

(superset) branch master updated: feat(helm): optionally set pod disruption budgets (#27163)

This is an automated email from the ASF dual-hosted git repository.

craigrueda pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 3818da8509 feat(helm): optionally set pod disruption budgets (#27163)
3818da8509 is described below

commit 3818da850957c779e8d24071a4fc7302cd053959
Author: Prada Souvanlasy <pr...@komodohealth.com>
AuthorDate: Wed Feb 21 00:51:54 2024 +0100

    feat(helm): optionally set pod disruption budgets (#27163)
---
 helm/superset/Chart.yaml                       |  2 +-
 helm/superset/README.md                        | 22 ++++++++++++-
 helm/superset/templates/_helpers.tpl           | 25 ++++++++++++++
 helm/superset/templates/deployment-beat.yaml   |  3 +-
 helm/superset/templates/deployment-flower.yaml |  3 +-
 helm/superset/templates/deployment-worker.yaml |  3 +-
 helm/superset/templates/deployment-ws.yaml     |  3 +-
 helm/superset/templates/deployment.yaml        |  3 +-
 helm/superset/templates/pdb-beat.yaml          | 45 ++++++++++++++++++++++++++
 helm/superset/templates/pdb-flower.yaml        | 45 ++++++++++++++++++++++++++
 helm/superset/templates/pdb-worker.yaml        | 45 ++++++++++++++++++++++++++
 helm/superset/templates/pdb-ws.yaml            | 45 ++++++++++++++++++++++++++
 helm/superset/templates/pdb.yaml               | 45 ++++++++++++++++++++++++++
 helm/superset/values.yaml                      | 41 ++++++++++++++++++++++-
 14 files changed, 317 insertions(+), 13 deletions(-)

diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml
index b0fa5509cf..69229061a8 100644
--- a/helm/superset/Chart.yaml
+++ b/helm/superset/Chart.yaml
@@ -29,7 +29,7 @@ maintainers:
   - name: craig-rueda
     email: craig@craigrueda.com
     url: https://github.com/craig-rueda
-version: 0.12.5
+version: 0.12.6
 dependencies:
   - name: postgresql
     version: 12.1.6
diff --git a/helm/superset/README.md b/helm/superset/README.md
index e1fc7533d4..1651bc0f96 100644
--- a/helm/superset/README.md
+++ b/helm/superset/README.md
@@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs
 
 # superset
 
-![Version: 0.12.5](https://img.shields.io/badge/Version-0.12.5-informational?style=flat-square)
+![Version: 0.12.6](https://img.shields.io/badge/Version-0.12.6-informational?style=flat-square)
 
 Apache Superset is a modern, enterprise-ready business intelligence web application
 
@@ -134,6 +134,10 @@ On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverri
 | supersetCeleryBeat.forceReload | bool | `false` | If true, forces deployment to reload on each upgrade |
 | supersetCeleryBeat.initContainers | list | a container waiting for postgres | List of init containers |
 | supersetCeleryBeat.podAnnotations | object | `{}` | Annotations to be added to supersetCeleryBeat pods |
+| supersetCeleryBeat.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":1}` | Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetCeleryBeat pods |
+| supersetCeleryBeat.podDisruptionBudget.enabled | bool | `false` | Whether the pod disruption budget should be created |
+| supersetCeleryBeat.podDisruptionBudget.maxUnavailable | int | `1` | If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
+| supersetCeleryBeat.podDisruptionBudget.minAvailable | int | `1` | If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
 | supersetCeleryBeat.podLabels | object | `{}` | Labels to be added to supersetCeleryBeat pods |
 | supersetCeleryBeat.podSecurityContext | object | `{}` |  |
 | supersetCeleryBeat.resources | object | `{}` | Resource settings for the CeleryBeat pods - these settings overwrite might existing values from the global resources object defined above. |
@@ -153,6 +157,10 @@ On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverri
 | supersetCeleryFlower.livenessProbe.successThreshold | int | `1` |  |
 | supersetCeleryFlower.livenessProbe.timeoutSeconds | int | `1` |  |
 | supersetCeleryFlower.podAnnotations | object | `{}` | Annotations to be added to supersetCeleryFlower pods |
+| supersetCeleryFlower.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":1}` | Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetCeleryFlower pods |
+| supersetCeleryFlower.podDisruptionBudget.enabled | bool | `false` | Whether the pod disruption budget should be created |
+| supersetCeleryFlower.podDisruptionBudget.maxUnavailable | int | `1` | If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
+| supersetCeleryFlower.podDisruptionBudget.minAvailable | int | `1` | If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
 | supersetCeleryFlower.podLabels | object | `{}` | Labels to be added to supersetCeleryFlower pods |
 | supersetCeleryFlower.podSecurityContext | object | `{}` |  |
 | supersetCeleryFlower.readinessProbe.failureThreshold | int | `3` |  |
@@ -210,6 +218,10 @@ On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverri
 | supersetNode.livenessProbe.successThreshold | int | `1` |  |
 | supersetNode.livenessProbe.timeoutSeconds | int | `1` |  |
 | supersetNode.podAnnotations | object | `{}` | Annotations to be added to supersetNode pods |
+| supersetNode.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":1}` | Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetNode pods |
+| supersetNode.podDisruptionBudget.enabled | bool | `false` | Whether the pod disruption budget should be created |
+| supersetNode.podDisruptionBudget.maxUnavailable | int | `1` | If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
+| supersetNode.podDisruptionBudget.minAvailable | int | `1` | If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
 | supersetNode.podLabels | object | `{}` | Labels to be added to supersetNode pods |
 | supersetNode.podSecurityContext | object | `{}` |  |
 | supersetNode.readinessProbe.failureThreshold | int | `3` |  |
@@ -250,6 +262,10 @@ On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverri
 | supersetWebsockets.livenessProbe.successThreshold | int | `1` |  |
 | supersetWebsockets.livenessProbe.timeoutSeconds | int | `1` |  |
 | supersetWebsockets.podAnnotations | object | `{}` |  |
+| supersetWebsockets.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":1}` | Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetWebsockets pods |
+| supersetWebsockets.podDisruptionBudget.enabled | bool | `false` | Whether the pod disruption budget should be created |
+| supersetWebsockets.podDisruptionBudget.maxUnavailable | int | `1` | If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
+| supersetWebsockets.podDisruptionBudget.minAvailable | int | `1` | If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
 | supersetWebsockets.podLabels | object | `{}` |  |
 | supersetWebsockets.podSecurityContext | object | `{}` |  |
 | supersetWebsockets.readinessProbe.failureThreshold | int | `3` |  |
@@ -294,6 +310,10 @@ On helm this can be set on `extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverri
 | supersetWorker.livenessProbe.successThreshold | int | `1` |  |
 | supersetWorker.livenessProbe.timeoutSeconds | int | `60` |  |
 | supersetWorker.podAnnotations | object | `{}` | Annotations to be added to supersetWorker pods |
+| supersetWorker.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1,"minAvailable":1}` | Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetWorker pods |
+| supersetWorker.podDisruptionBudget.enabled | bool | `false` | Whether the pod disruption budget should be created |
+| supersetWorker.podDisruptionBudget.maxUnavailable | int | `1` | If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
+| supersetWorker.podDisruptionBudget.minAvailable | int | `1` | If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget |
 | supersetWorker.podLabels | object | `{}` | Labels to be added to supersetWorker pods |
 | supersetWorker.podSecurityContext | object | `{}` |  |
 | supersetWorker.readinessProbe | object | `{}` | No startup/readiness probes by default since we don't really care about its startup time (it doesn't serve traffic) |
diff --git a/helm/superset/templates/_helpers.tpl b/helm/superset/templates/_helpers.tpl
index 6d8cfe0161..a4f9b65f14 100644
--- a/helm/superset/templates/_helpers.tpl
+++ b/helm/superset/templates/_helpers.tpl
@@ -136,3 +136,28 @@ RESULTS_BACKEND = RedisCache(
 {{- end }}
 
 {{- end }}
+
+{{- define "supersetCeleryBeat.selectorLabels" -}}
+app: {{ include "superset.name" . }}-celerybeat
+release: {{ .Release.Name }}
+{{- end }}
+
+{{- define "supersetCeleryFlower.selectorLabels" -}}
+app: {{ include "superset.name" . }}-flower
+release: {{ .Release.Name }}
+{{- end }}
+
+{{- define "supersetNode.selectorLabels" -}}
+app: {{ include "superset.name" . }}
+release: {{ .Release.Name }}
+{{- end }}
+
+{{- define "supersetWebsockets.selectorLabels" -}}
+app: {{ include "superset.name" . }}-ws
+release: {{ .Release.Name }}
+{{- end }}
+
+{{- define "supersetWorker.selectorLabels" -}}
+app: {{ include "superset.name" . }}-worker
+release: {{ .Release.Name }}
+{{- end }}
diff --git a/helm/superset/templates/deployment-beat.yaml b/helm/superset/templates/deployment-beat.yaml
index 30d1eff61a..c6e3d71dae 100644
--- a/helm/superset/templates/deployment-beat.yaml
+++ b/helm/superset/templates/deployment-beat.yaml
@@ -36,8 +36,7 @@ spec:
   replicas: 1
   selector:
     matchLabels:
-      app: {{ template "superset.name" . }}-celerybeat
-      release: {{ .Release.Name }}
+    {{- include "supersetCeleryBeat.selectorLabels" . | nindent 6 }}
   template:
     metadata:
       annotations:
diff --git a/helm/superset/templates/deployment-flower.yaml b/helm/superset/templates/deployment-flower.yaml
index e4b05a17e9..d00f6af7f5 100644
--- a/helm/superset/templates/deployment-flower.yaml
+++ b/helm/superset/templates/deployment-flower.yaml
@@ -35,8 +35,7 @@ spec:
   replicas: {{ .Values.supersetCeleryFlower.replicaCount }}
   selector:
     matchLabels:
-      app: {{ template "superset.name" . }}-flower
-      release: {{ .Release.Name }}
+    {{- include "supersetCeleryFlower.selectorLabels" . | nindent 6 }}
   template:
     metadata:
       annotations:
diff --git a/helm/superset/templates/deployment-worker.yaml b/helm/superset/templates/deployment-worker.yaml
index 2710ff40fe..e75f048b14 100644
--- a/helm/superset/templates/deployment-worker.yaml
+++ b/helm/superset/templates/deployment-worker.yaml
@@ -39,8 +39,7 @@ spec:
   {{- end }}
   selector:
     matchLabels:
-      app: {{ template "superset.name" . }}-worker
-      release: {{ .Release.Name }}
+    {{- include "supersetWorker.selectorLabels" . | nindent 6 }}
   {{- if .Values.supersetWorker.strategy }}
   strategy: {{- toYaml .Values.supersetWorker.strategy | nindent 4 }}
   {{- end }}
diff --git a/helm/superset/templates/deployment-ws.yaml b/helm/superset/templates/deployment-ws.yaml
index 7612900b07..2556d8e775 100644
--- a/helm/superset/templates/deployment-ws.yaml
+++ b/helm/superset/templates/deployment-ws.yaml
@@ -35,8 +35,7 @@ spec:
   replicas: {{ .Values.supersetWebsockets.replicaCount }}
   selector:
     matchLabels:
-      app: "{{ template "superset.name" . }}-ws"
-      release: {{ .Release.Name }}
+    {{- include "supersetWebsockets.selectorLabels" . | nindent 6 }}
   {{- if .Values.supersetWebsockets.strategy }}
   strategy: {{- toYaml .Values.supersetWebsockets.strategy | nindent 4 }}
   {{- end }}
diff --git a/helm/superset/templates/deployment.yaml b/helm/superset/templates/deployment.yaml
index 19a32d7069..87d380eba6 100644
--- a/helm/superset/templates/deployment.yaml
+++ b/helm/superset/templates/deployment.yaml
@@ -42,8 +42,7 @@ spec:
   {{- end }}
   selector:
     matchLabels:
-      app: {{ template "superset.name" . }}
-      release: {{ .Release.Name }}
+    {{- include "supersetNode.selectorLabels" . | nindent 6 }}
   template:
     metadata:
       annotations:
diff --git a/helm/superset/templates/pdb-beat.yaml b/helm/superset/templates/pdb-beat.yaml
new file mode 100644
index 0000000000..de808b475c
--- /dev/null
+++ b/helm/superset/templates/pdb-beat.yaml
@@ -0,0 +1,45 @@
+{{/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/}}
+
+{{- with .Values.supersetCeleryBeat.podDisruptionBudget }}
+{{- if .enabled -}}
+{{- if and .minAvailable .maxUnavailable }}
+{{- fail "Only one of minAvailable or maxUnavailable should be set" }}
+{{- end}}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "superset.fullname" $ }}-celerybeat-pdb
+  labels:
+    app: {{ template "superset.name" $ }}-celerybeat
+    chart: {{ template "superset.chart" $ }}
+    release: {{ $.Release.Name }}
+    heritage: {{ $.Release.Service }}
+spec:
+{{- if .minAvailable }}
+  minAvailable: {{ .minAvailable }}
+{{- end }}
+{{- if .maxUnavailable }}
+  maxUnavailable: {{ .maxUnavailable }}
+{{- end }}
+  selector:
+    matchLabels:
+    {{- include "supersetCeleryBeat.selectorLabels" $ | nindent 6 }}
+{{- end }}
+{{- end }}
diff --git a/helm/superset/templates/pdb-flower.yaml b/helm/superset/templates/pdb-flower.yaml
new file mode 100644
index 0000000000..363ec7a42a
--- /dev/null
+++ b/helm/superset/templates/pdb-flower.yaml
@@ -0,0 +1,45 @@
+{{/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/}}
+
+{{- with .Values.supersetCeleryFlower.podDisruptionBudget }}
+{{- if .enabled -}}
+{{- if and .minAvailable .maxUnavailable }}
+{{- fail "Only one of minAvailable or maxUnavailable should be set" }}
+{{- end}}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "superset.fullname" $ }}-flower-pdb
+  labels:
+    app: {{ template "superset.name" $ }}-flower
+    chart: {{ template "superset.chart" $ }}
+    release: {{ $.Release.Name }}
+    heritage: {{ $.Release.Service }}
+spec:
+{{- if .minAvailable }}
+  minAvailable: {{ .minAvailable }}
+{{- end }}
+{{- if .maxUnavailable }}
+  maxUnavailable: {{ .maxUnavailable }}
+{{- end }}
+  selector:
+    matchLabels:
+    {{- include "supersetCeleryFlower.selectorLabels" $ | nindent 6 }}
+{{- end }}
+{{- end }}
diff --git a/helm/superset/templates/pdb-worker.yaml b/helm/superset/templates/pdb-worker.yaml
new file mode 100644
index 0000000000..1636622616
--- /dev/null
+++ b/helm/superset/templates/pdb-worker.yaml
@@ -0,0 +1,45 @@
+{{/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/}}
+
+{{- with .Values.supersetWorker.podDisruptionBudget }}
+{{- if .enabled -}}
+{{- if and .minAvailable .maxUnavailable }}
+{{- fail "Only one of minAvailable or maxUnavailable should be set" }}
+{{- end}}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "superset.fullname" $ }}-worker-pdb
+  labels:
+    app: {{ template "superset.name" $ }}-worker
+    chart: {{ template "superset.chart" $ }}
+    release: {{ $.Release.Name }}
+    heritage: {{ $.Release.Service }}
+spec:
+{{- if .minAvailable }}
+  minAvailable: {{ .minAvailable }}
+{{- end }}
+{{- if .maxUnavailable }}
+  maxUnavailable: {{ .maxUnavailable }}
+{{- end }}
+  selector:
+    matchLabels:
+    {{- include "supersetWorker.selectorLabels" $ | nindent 6 }}
+{{- end }}
+{{- end }}
diff --git a/helm/superset/templates/pdb-ws.yaml b/helm/superset/templates/pdb-ws.yaml
new file mode 100644
index 0000000000..647d6b4944
--- /dev/null
+++ b/helm/superset/templates/pdb-ws.yaml
@@ -0,0 +1,45 @@
+{{/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/}}
+
+{{- with .Values.supersetWebsockets.podDisruptionBudget }}
+{{- if .enabled -}}
+{{- if and .minAvailable .maxUnavailable }}
+{{- fail "Only one of minAvailable or maxUnavailable should be set" }}
+{{- end}}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "superset.fullname" $ }}-ws-pdb
+  labels:
+    app: {{ template "superset.name" $ }}-ws
+    chart: {{ template "superset.chart" $ }}
+    release: {{ $.Release.Name }}
+    heritage: {{ $.Release.Service }}
+spec:
+{{- if .minAvailable }}
+  minAvailable: {{ .minAvailable }}
+{{- end }}
+{{- if .maxUnavailable }}
+  maxUnavailable: {{ .maxUnavailable }}
+{{- end }}
+  selector:
+    matchLabels:
+    {{- include "supersetWebsockets.selectorLabels" $ | nindent 6 }}
+{{- end }}
+{{- end }}
diff --git a/helm/superset/templates/pdb.yaml b/helm/superset/templates/pdb.yaml
new file mode 100644
index 0000000000..0d825343d3
--- /dev/null
+++ b/helm/superset/templates/pdb.yaml
@@ -0,0 +1,45 @@
+{{/*
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+*/}}
+
+{{- with .Values.supersetNode.podDisruptionBudget }}
+{{- if .enabled -}}
+{{- if and .minAvailable .maxUnavailable }}
+{{- fail "Only one of minAvailable or maxUnavailable should be set" }}
+{{- end}}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "superset.fullname" $ }}-pdb
+  labels:
+    app: {{ template "superset.name" $ }}
+    chart: {{ template "superset.chart" $ }}
+    release: {{ $.Release.Name }}
+    heritage: {{ $.Release.Service }}
+spec:
+{{- if .minAvailable }}
+  minAvailable: {{ .minAvailable }}
+{{- end }}
+{{- if .maxUnavailable }}
+  maxUnavailable: {{ .maxUnavailable }}
+{{- end }}
+  selector:
+    matchLabels:
+    {{- include "supersetNode.selectorLabels" $ | nindent 6 }}
+{{- end }}
+{{- end }}
diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml
index 253555e1ff..2e5517ebe9 100644
--- a/helm/superset/values.yaml
+++ b/helm/superset/values.yaml
@@ -248,6 +248,14 @@ supersetNode:
     maxReplicas: 100
     targetCPUUtilizationPercentage: 80
     # targetMemoryUtilizationPercentage: 80
+  # -- Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetNode pods
+  podDisruptionBudget:
+    # -- Whether the pod disruption budget should be created
+    enabled: false
+    # -- If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    minAvailable: 1
+    # -- If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    maxUnavailable: 1
 
   # -- Startup command
   # @default -- See `values.yaml`
@@ -357,7 +365,14 @@ supersetWorker:
     maxReplicas: 100
     targetCPUUtilizationPercentage: 80
     # targetMemoryUtilizationPercentage: 80
-
+  # -- Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetWorker pods
+  podDisruptionBudget:
+    # -- Whether the pod disruption budget should be created
+    enabled: false
+    # -- If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    minAvailable: 1
+    # -- If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    maxUnavailable: 1
   # -- Worker startup command
   # @default -- a `celery worker` command
   command:
@@ -430,6 +445,14 @@ supersetWorker:
 supersetCeleryBeat:
   # -- This is only required if you intend to use alerts and reports
   enabled: false
+  # -- Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetCeleryBeat pods
+  podDisruptionBudget:
+    # -- Whether the pod disruption budget should be created
+    enabled: false
+    # -- If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    minAvailable: 1
+    # -- If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    maxUnavailable: 1
   # -- Command
   # @default -- a `celery beat` command
   command:
@@ -480,6 +503,14 @@ supersetCeleryFlower:
   # flower>=1.0.0 requires Celery 5+ which Superset 1.5 does not support
   enabled: false
   replicaCount: 1
+  # -- Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetCeleryFlower pods
+  podDisruptionBudget:
+    # -- Whether the pod disruption budget should be created
+    enabled: false
+    # -- If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    minAvailable: 1
+    # -- If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    maxUnavailable: 1
   # -- Command
   # @default -- a `celery flower` command
   command:
@@ -562,6 +593,14 @@ supersetWebsockets:
   # see https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries
   enabled: false
   replicaCount: 1
+  # -- Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetWebsockets pods
+  podDisruptionBudget:
+    # -- Whether the pod disruption budget should be created
+    enabled: false
+    # -- If set, maxUnavailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    minAvailable: 1
+    # -- If set, minAvailable must not be set - see https://kubernetes.io/docs/tasks/run-application/configure-pdb/#specifying-a-poddisruptionbudget
+    maxUnavailable: 1
   ingress:
     path: /ws
     pathType: Prefix