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

Miretpl 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 696d09de527 Add annotations to helm chart priorityclasses (#74457)
696d09de527 is described below

commit 696d09de52717b754691afc49f51585a519ae065
Author: Aakcht <[email protected]>
AuthorDate: Sat Nov 7 00:42:45 2026 +0500

    Add annotations to helm chart priorityclasses (#74457)
    
    Co-authored-by: Przemysław Mirowski 
<[email protected]>
---
 chart/templates/priorityclasses/priority-classes.yaml       | 3 +++
 chart/tests/helm_tests/airflow_aux/test_basic_helm_chart.py | 8 +++++++-
 chart/values.schema.json                                    | 6 ++++++
 chart/values.yaml                                           | 2 ++
 4 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/chart/templates/priorityclasses/priority-classes.yaml 
b/chart/templates/priorityclasses/priority-classes.yaml
index 777c536c0f6..39f007a6a0b 100644
--- a/chart/templates/priorityclasses/priority-classes.yaml
+++ b/chart/templates/priorityclasses/priority-classes.yaml
@@ -35,6 +35,9 @@ metadata:
     {{- with $Global.Values.labels }}
       {{- toYaml . | nindent 4 }}
     {{- end }}
+  {{- with $e.annotations }}
+  annotations: {{- toYaml . | nindent 4 }}
+  {{- end }}
 preemptionPolicy: {{ default "PreemptLowerPriority" $e.preemptionPolicy }}
 value: {{ $e.value | required "value is required for priority classes" }}
 description: "This priority class will not cause other pods to be preempted."
diff --git a/chart/tests/helm_tests/airflow_aux/test_basic_helm_chart.py 
b/chart/tests/helm_tests/airflow_aux/test_basic_helm_chart.py
index 6fe077fa182..f365818e76c 100644
--- a/chart/tests/helm_tests/airflow_aux/test_basic_helm_chart.py
+++ b/chart/tests/helm_tests/airflow_aux/test_basic_helm_chart.py
@@ -608,7 +608,12 @@ class TestBaseChartTest:
     def test_priority_classes(self):
         pc = [
             {"name": "class1", "preemptionPolicy": "PreemptLowerPriority", 
"value": 1000},
-            {"name": "class2", "preemptionPolicy": "Never", "value": 10000},
+            {
+                "name": "class2",
+                "annotations": {"key1": "value1"},
+                "preemptionPolicy": "Never",
+                "value": 10000,
+            },
         ]
         objs = render_chart(
             "my-release",
@@ -625,6 +630,7 @@ class TestBaseChartTest:
             assert objs[i]["preemptionPolicy"] == pc[i]["preemptionPolicy"]
             assert objs[i]["value"] == pc[i]["value"]
             assert objs[i]["description"] == "This priority class will not 
cause other pods to be preempted."
+        assert objs[1]["metadata"]["annotations"]["key1"] == "value1"
 
     def test_priority_classes_default_preemption(self):
         obj = render_chart(
diff --git a/chart/values.schema.json b/chart/values.schema.json
index b58b10a65b2..04b95c4cf83 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -1188,6 +1188,12 @@
                     "name": {
                         "type": "string"
                     },
+                    "annotations": {
+                        "type": "object",
+                        "additionalProperties": {
+                            "type": "string"
+                        }
+                    },
                     "preemptionPolicy": {
                         "type": "string"
                     },
diff --git a/chart/values.yaml b/chart/values.yaml
index 59871624dff..3edecf5ad95 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -376,6 +376,8 @@ priorityClasses: []
 #    preemptionPolicy: PreemptLowerPriority
 #    value: 10000
 #  - name: class2
+#    annotations:
+#      class2.annotation.key: class2_annotation_value
 #    preemptionPolicy: Never
 #    value: 100000
 

Reply via email to