This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch chart/v1-2x-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/chart/v1-2x-test by this push:
new f762ab54bbe [chart/v1-2x-test] Add annotations to helm chart
priorityclasses (#74457) (#76628)
f762ab54bbe is described below
commit f762ab54bbe8cb0e693dbf973b15d0ef17a3ad86
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Nov 11 10:14:00 2026 +0000
[chart/v1-2x-test] Add annotations to helm chart priorityclasses (#74457)
(#76628)
(cherry picked from commit 696d09de52717b754691afc49f51585a519ae065)
Co-authored-by: Aakcht <[email protected]>
Co-authored-by: Przemysław Mirowski
<[email protected]>
---
chart/templates/priorityclasses/priority-classes.yaml | 3 +++
chart/values.schema.json | 6 ++++++
chart/values.yaml | 2 ++
helm-tests/tests/helm_tests/airflow_aux/test_basic_helm_chart.py | 8 +++++++-
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/values.schema.json b/chart/values.schema.json
index 6a2b5e2da0d..b0baac49808 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -1312,6 +1312,12 @@
"name": {
"type": "string"
},
+ "annotations": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
"preemptionPolicy": {
"type": "string"
},
diff --git a/chart/values.yaml b/chart/values.yaml
index f4835179d0c..6e0cc035d0b 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -440,6 +440,8 @@ priorityClasses: []
# preemptionPolicy: PreemptLowerPriority
# value: 10000
# - name: class2
+# annotations:
+# class2.annotation.key: class2_annotation_value
# preemptionPolicy: Never
# value: 100000
diff --git a/helm-tests/tests/helm_tests/airflow_aux/test_basic_helm_chart.py
b/helm-tests/tests/helm_tests/airflow_aux/test_basic_helm_chart.py
index 228b2ed0979..8928c5bef1e 100644
--- a/helm-tests/tests/helm_tests/airflow_aux/test_basic_helm_chart.py
+++ b/helm-tests/tests/helm_tests/airflow_aux/test_basic_helm_chart.py
@@ -847,7 +847,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",
@@ -864,6 +869,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(