goncalo-m-c opened a new pull request, #55832:
URL: https://github.com/apache/airflow/pull/55832
TL;DR: Add support in Helm chart for custom labels in redis, statsd and
dagProcessor objects
### Description
I would like to be able to customize the labels defined for Airflow
Kubernetes resources so I can comply with my company guidelines and be able to
track all objects in the same way.
This PR adds the ability to specify custom labels for all Airflow objects
and pods defined in the Helm chart. Labels can be set globally through
`.Values.labels` and component-specifically through `<component>.labels`. These
labels are merged, with component-specific labels taking precedence.
### Changes
- Added labels property to redis, statsd and dagProcessor components.
- Updated values.schema.json to include schema definitions for label fields
- Added documentation in `chart/docs/customizing-labels-for-pods.rst`
explaining the labeling system
### Example Usage
```yaml
# Global labels for all objects and pods
labels:
environment: production
# Component-specific labels
scheduler:
labels:
role: scheduler
workers:
labels:
role: worker
webserver:
labels:
role: ui
```
### Checklist
- [x] Description above provides context of the change
- [x] Added schema definitions for new configuration options
- [x] Documented new values in values.yaml in docs/
- [x] Used `mustMerge` to properly handle label merging
- [x] No breaking changes introduced
### Additional Notes
Deployments are currently only labeled with global labels and I don't know
if this is done for a specific reason. If possible, I would also like to
implement custom labels for Deployments.
---
**^ Add meaningful description above**
Read the **[Pull Request
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
for more information.
In case of fundamental code changes, an Airflow Improvement Proposal
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party
License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in a
newsfragment file, named `{pr_number}.significant.rst` or
`{issue_number}.significant.rst`, in
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
--
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]