vyncint opened a new pull request, #70205:
URL: https://github.com/apache/airflow/pull/70205

   Add `podLabels` so workload object labels and pod labels can be configured 
separately, for `apiServer`, `scheduler`, `workers.celery`, `triggerer`, 
`dagProcessor`, `flower`, `statsd`, `pgbouncer`, `redis` and `otelCollector`.
   
   When `podLabels` is unset, existing behavior remains unchanged: 
`<component>.labels` stays on the pods, while the Deployment or StatefulSet 
receives only global labels. Setting `podLabels` (including `{}`) opts into 
separation: `<component>.labels` applies to the workload object and 
`<component>.podLabels` applies to pods. Component values retain precedence 
over global labels.
   
   `otelCollector` is the one exception: its Deployment already merged 
component labels onto the object, so only its pod side gains the new knob and 
its object labels are unchanged.
   
   closes: #53190
   
   Behaviour matrix, verified by rendering every affected workload:
   
   | `podLabels` | workload object labels | pod labels |
   | --- | --- | --- |
   | unset (default `~`) | global only — unchanged | component + global |
   | set | component + global | podLabels + global |
   | `{}` | component + global | global only |
   
   Tests:
   
   - `pytest helm_tests/airflow_aux/test_pod_labels.py helm_tests/dagprocessor` 
— 38 passed. The new module parametrizes all three states over every component; 
`dagProcessor` keeps its existing dedicated module.
   - `pytest helm_tests/{dagprocessor,statsd,otel_collector,redis} 
helm_tests/airflow_core/test_{api_server,scheduler,triggerer,worker}.py 
helm_tests/other/test_{flower,pgbouncer}.py` — 779 passed, 1 failed.
   - `pytest 
helm_tests/airflow_aux/test_{chart_quality,basic_helm_chart,annotations}.py` — 
114 passed, 9 failed.
   - Backward compatibility: `helm template` with every component's `labels` 
set and `podLabels` unset is **byte-identical to main across 3638 lines** 
(random secrets pinned so the render is deterministic).
   
   The 10 local failures are pre-existing and unrelated: they assert on Helm's 
JSON-schema error wording (`value must be one of 'X'`) while local Helm 3.14.4 
emits `must be one of the following: "X"`, and they cover 
`dags.persistence.accessMode`, `*.pullPolicy` and `apiServer.securityContext`. 
Re-running the same modules on a clean checkout reproduces exactly the same 
counts, so this change adds no new failures.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Codex (GPT-5) for the initial `dagProcessor` commit, Claude Opus 
5 for this revision
   
   Generated-by: Codex (GPT-5), Claude Opus 5 following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to