apache/airflow

Use Kubernetes-recommended labels for airflow helm chart

Open

#34,048 opened on Sep 3, 2023

View on GitHub
 (6 comments) (0 reactions) (0 assignees)Python (16,781 forks)batch import
area:helm-chartgood first issuekind:feature

Repository metrics

Stars
 (44,809 stars)
PR merge metrics
 (Avg merge 7d 18h) (834 merged PRs in 30d)

Description

Description

Kubernetes offers a list of recommended labels for grouping resource objects. The prefix app.kubernetes.io differentiates these recommended labels from custom labels.

Why is it needed? Enhancing readability and maintainability

References https://helm.sh/docs/chart_best_practices/labels/#standard-labels https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels

Use case/motivation

https://github.com/apache/airflow/blob/913eff6759bf89d635ef1df1a0db23c157e48c4b/chart/templates/webserver/webserver-deployment.yaml#L36-L40

The above labels would be changed as follows:

app.kubernetes.io/part-of: airflow
app.kubernetes.io/component: webserver
app.kubernetes.io/instance: {{ .Release.Name }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Contributor guide