This is an automated email from the ASF dual-hosted git repository.
jscheffl 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 a493aae4178 Add team_name as option for dag_bundle_config_list in Helm
Chart (#67991)
a493aae4178 is described below
commit a493aae41786134c777c34d57f0b998fb9566364
Author: KidAmnesiac1 <[email protected]>
AuthorDate: Thu Jun 4 19:40:23 2026 +0800
Add team_name as option for dag_bundle_config_list in Helm Chart (#67991)
Since the addition of multi team, support the kwarg team_name.
This change will allow the helm chart to support team_name as an
option for airflow.config.dag_processor.dag_bundle_config_list
---
chart/templates/_helpers.yaml | 3 +++
.../tests/helm_tests/airflow_aux/test_configmap.py | 21 ++++++++++++++++++++-
chart/values.schema.json | 4 ++++
3 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/chart/templates/_helpers.yaml b/chart/templates/_helpers.yaml
index 7f991266c17..c5533e38485 100644
--- a/chart/templates/_helpers.yaml
+++ b/chart/templates/_helpers.yaml
@@ -1075,6 +1075,9 @@ Usage:
{{- $bundles := list -}}
{{- range .Values.dagProcessor.dagBundleConfigList -}}
{{- $bundle := dict "name" .name "classpath" .classpath "kwargs"
(.kwargs | default dict) -}}
+ {{- if .team_name -}}
+ {{- $_ := set $bundle "team_name" .team_name -}}
+ {{- end -}}
{{- $bundles = append $bundles $bundle -}}
{{- end -}}
{{- $bundles | toJson -}}
diff --git a/chart/tests/helm_tests/airflow_aux/test_configmap.py
b/chart/tests/helm_tests/airflow_aux/test_configmap.py
index e928076c0e6..4ad25f94e2c 100644
--- a/chart/tests/helm_tests/airflow_aux/test_configmap.py
+++ b/chart/tests/helm_tests/airflow_aux/test_configmap.py
@@ -320,6 +320,16 @@ metadata:
"classpath":
"airflow.dag_processing.bundles.local.LocalDagBundle",
"kwargs": {},
},
+ {
+ "name": "team-bundle",
+ "team_name": "team-a",
+ "classpath":
"airflow.providers.git.bundles.git.GitDagBundle",
+ "kwargs": {
+ "git_conn_id": "GITHUB__team_repo",
+ "subdir": "team-dags",
+ "tracking_ref": "main",
+ },
+ },
],
},
},
@@ -337,7 +347,7 @@ metadata:
# Parse and validate JSON structure
bundles = json.loads(json_str)
assert isinstance(bundles, list), "dag_bundle_config_list should be a
list"
- assert len(bundles) == 3, f"Expected 3 bundles, got {len(bundles)}"
+ assert len(bundles) == 4, f"Expected 4 bundles, got {len(bundles)}"
# Verify bundle1
bundle1 = next((b for b in bundles if b["name"] == "bundle1"), None)
@@ -362,3 +372,12 @@ metadata:
assert dags_folder is not None, "dags-folder not found"
assert dags_folder["classpath"] ==
"airflow.dag_processing.bundles.local.LocalDagBundle"
assert dags_folder["kwargs"] == {}
+
+ # Verify team-bundle
+ team_bundle = next((b for b in bundles if b["name"] == "team-bundle"),
None)
+ assert team_bundle is not None, "team-bundle not found"
+ assert team_bundle["team_name"] == "team-a"
+ assert team_bundle["classpath"] ==
"airflow.providers.git.bundles.git.GitDagBundle"
+ assert team_bundle["kwargs"]["git_conn_id"] == "GITHUB__team_repo"
+ assert team_bundle["kwargs"]["subdir"] == "team-dags"
+ assert team_bundle["kwargs"]["tracking_ref"] == "main"
diff --git a/chart/values.schema.json b/chart/values.schema.json
index bc094f6b5fb..9b8f3a04b56 100644
--- a/chart/values.schema.json
+++ b/chart/values.schema.json
@@ -5764,6 +5764,10 @@
"description": "Name of the Dag bundle.",
"type": "string"
},
+ "team_name": {
+ "description": "Team name for the Dag bundle.",
+ "type": "string"
+ },
"classpath": {
"description": "Class path of the Dag bundle
class.",
"type": "string"