Skip to content

Added Labels to dagprocessor in helm chart - #53358

Closed
tanujdargan wants to merge 7 commits into
apache:mainfrom
tanujdargan:dagprocessor-helm-labels
Closed

tanujdargan wants to merge 7 commits into
apache:mainfrom
tanujdargan:dagprocessor-helm-labels

Conversation

@tanujdargan

Copy link
Copy Markdown
Contributor

Closes: #53190

  • New Features

    • Added support for specifying custom labels for the DAG Processor component, applied to both deployment and pod resources.
  • Tests

    • Introduced a test to verify custom DAG Processor labels are correctly applied in the deployment manifest.

@prakass1

Copy link
Copy Markdown

I think the dag-processor-serviceaccount (https://github.com/apache/airflow/blob/main/chart/templates/dag-processor/dag-processor-serviceaccount.yaml#L40) is also missing the addition of .Values.dagProcessor.labels alongside mustMerge. A similar example to lookup (https://github.com/apache/airflow/blob/main/chart/templates/api-server/api-server-serviceaccount.yaml#L36)

@prakass1 prakass1 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All previous things now seem to expect the values.schema.json. Once fixed, it should pass the unit test and be ready to merge I think.

Comment thread chart/values.schema.json Resolved
@prakass1

Copy link
Copy Markdown

I think the dag-processor-serviceaccount (https://github.com/apache/airflow/blob/main/chart/templates/dag-processor/dag-processor-serviceaccount.yaml#L40) is also missing the addition of .Values.dagProcessor.labels alongside mustMerge. A similar example to lookup (https://github.com/apache/airflow/blob/main/chart/templates/api-server/api-server-serviceaccount.yaml#L36)

Is added.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Sep 15, 2025
{{- if or (.Values.labels) (.Values.dagProcessor.labels) }}
{{- $global := default (dict) .Values.labels -}}
{{- $component := default (dict) .Values.dagProcessor.labels -}}
{{- mustMerge $global $component | toYaml | nindent 4 }}

@mbaeck5 mbaeck5 Sep 17, 2025 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was trying out this PR because we needed to label the dagProcessor. But when using KubernetesExecutor, worker pods were being spawned with the labels meant for the dagProcessor. The above code seems to be causing it.
From helm docs:
mustMerge does not create a deep copy of the dictionaries, so this will inject the dagProcessor labels into the global values. I think line 50 should be:

{{- $global := deepCopy (default (dict) .Values.labels) -}}

{{- if or (.Values.labels) (.Values.dagProcessor.labels) }}
{{- $global := default (dict) .Values.labels -}}
{{- $component := default (dict) .Values.dagProcessor.labels -}}
{{- mustMerge $component $global | toYaml | nindent 4 }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as comment above to prevent merging global values

@github-actions github-actions Bot removed the stale Stale PRs per the .github/workflows/stale.yml policy file label Sep 18, 2025
@Miretpl

Miretpl commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

FYI: There is a small discussion regarding a similar change in #59290

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Mar 11, 2026
@github-actions github-actions Bot closed this Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dagProcessor in helm chart doesn't have a labels section

5 participants