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

jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new cfaeb04ca97 Chart: Add dag processor PodDisruptionBudget support 
(#60294)
cfaeb04ca97 is described below

commit cfaeb04ca9799c37ccf8d58a67f28d44d295f12c
Author: Arunodoy Banerjee <[email protected]>
AuthorDate: Thu Jan 15 22:18:57 2026 +0530

    Chart: Add dag processor PodDisruptionBudget support (#60294)
---
 chart/newsfragments/60242.improvement.rst          |  1 +
 .../dag-processor-poddisruptionbudget.yaml         | 50 ++++++++++++++++++++++
 chart/values.schema.json                           | 35 +++++++++++++++
 chart/values.yaml                                  | 10 +++++
 4 files changed, 96 insertions(+)

diff --git a/chart/newsfragments/60242.improvement.rst 
b/chart/newsfragments/60242.improvement.rst
new file mode 100644
index 00000000000..fa1e61336f3
--- /dev/null
+++ b/chart/newsfragments/60242.improvement.rst
@@ -0,0 +1 @@
+Expose ``dagProcessor.podDisruptionBudget`` settings so the DAG Processor can 
be protected with a configurable PodDisruptionBudget, matching the other 
components.
diff --git 
a/chart/templates/dag-processor/dag-processor-poddisruptionbudget.yaml 
b/chart/templates/dag-processor/dag-processor-poddisruptionbudget.yaml
new file mode 100644
index 00000000000..e72676b186d
--- /dev/null
+++ b/chart/templates/dag-processor/dag-processor-poddisruptionbudget.yaml
@@ -0,0 +1,50 @@
+{{/*
+ 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.
+*/}}
+
+################################
+## Airflow Dag Processor PodDisruptionBudget
+#################################
+{{- if semverCompare ">=2.3.0" .Values.airflowVersion }}
+{{- $enabled := .Values.dagProcessor.enabled }}
+{{- if eq $enabled nil}}
+  {{ $enabled = ternary true false (semverCompare ">=3.0.0" 
.Values.airflowVersion) }}
+{{- end }}
+{{- if and $enabled .Values.dagProcessor.podDisruptionBudget.enabled }}
+apiVersion: policy/v1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "airflow.fullname" . }}-dag-processor-pdb
+  labels:
+    tier: airflow
+    component: dag-processor
+    release: {{ .Release.Name }}
+    chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+    heritage: {{ .Release.Service }}
+    {{- if or (.Values.labels) (.Values.dagProcessor.labels) }}
+      {{- mustMerge .Values.dagProcessor.labels .Values.labels | toYaml | 
nindent 4 }}
+    {{- end }}
+spec:
+  selector:
+    matchLabels:
+      tier: airflow
+      component: dag-processor
+      release: {{ .Release.Name }}
+  {{- toYaml .Values.dagProcessor.podDisruptionBudget.config | nindent 2 }}
+{{- end }}
+{{- end }}
diff --git a/chart/values.schema.json b/chart/values.schema.json
index a109c50a83b..5d065e032af 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -4425,6 +4425,41 @@
                         }
                     }
                 },
+                "podDisruptionBudget": {
+                    "description": "Dag processor pod disruption budget.",
+                    "type": "object",
+                    "additionalProperties": true,
+                    "properties": {
+                        "enabled": {
+                            "description": "Enable pod disruption budget.",
+                            "type": "boolean",
+                            "default": false
+                        },
+                        "config": {
+                            "description": "Disruption budget configuration.",
+                            "type": "object",
+                            "additionalProperties": true,
+                            "properties": {
+                                "maxUnavailable": {
+                                    "description": "Max unavailable pods for 
dag processor.",
+                                    "type": [
+                                        "integer",
+                                        "string"
+                                    ],
+                                    "default": 1
+                                },
+                                "minAvailable": {
+                                    "description": "Min available pods for dag 
processor.",
+                                    "type": [
+                                        "integer",
+                                        "string"
+                                    ],
+                                    "default": 1
+                                }
+                            }
+                        }
+                    }
+                },
                 "resources": {
                     "description": "Resources for dag processor pods.",
                     "type": "object",
diff --git a/chart/values.yaml b/chart/values.yaml
index b5b60fecb09..7d7881f2eee 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -2286,6 +2286,16 @@ dagProcessor:
     # Annotations to add to dag processor kubernetes service account.
     annotations: {}
 
+  # Dag processor pod disruption budget
+  podDisruptionBudget:
+    enabled: false
+
+    # PDB configuration
+    config:
+      # minAvailable and maxUnavailable are mutually exclusive
+      maxUnavailable: 1
+      # minAvailable: 1
+
   # When not set, the values defined in the global securityContext will be used
   securityContext: {}
   #  runAsUser: 50000

Reply via email to