Skip to content

workers.celery.serviceAccount.name is not used by Celery worker templates or RBAC bindings #67261

@benrifkind

Description

@benrifkind

Under which category would you file this issue?

Helm chart

Apache Airflow version

3.2.1

What happened and how to reproduce it?

When I deployed using the helm chart 1.21.0 by setting workers.celery.serviceAccount.name it had no effect on the Celery worker deployment, service account creation, or RBAC role bindings.

What you think should happen instead?

The release notes of the Helm release 1.21.0 say

workers.serviceAccount is now deprecated in favor of workers.celery.serviceAccount/workers.kubernetes.serviceAccount (#64730).

I thought that meant that I should set worker.celery.ServiceAccount but it seems to have no affect. Keeping the configuration at worker.ServiceAccount fixes the issue. I am not sure if I am misunderstanding the release note.

Expected behavior

Setting workers.celery.serviceAccount.name = "my-custom-sa" should result in:

  • The Celery worker deployment using that service account
  • The RBAC role bindings (pod-launcher, job-launcher) referencing that service account
  • The worker service account resource being created with that name (if create = true)

Actual behavior

All Celery worker templates use the worker.serviceAccountName helper, which reads from workers.serviceAccount (the deprecated path) and never checks workers.celery.serviceAccount. When a user only sets the new path, the helper falls back to generating a default name ({{ .Release.Name }}-worker), ignoring the user's configuration.

Root cause

PR #64730 added workers.celery.serviceAccount and workers.kubernetes.serviceAccount as new config sections and deprecated workers.serviceAccount. The PR correctly created a worker.kubernetes.serviceAccountName helper that reads from workers.kubernetes.serviceAccount via subKey = "kubernetes". However, no equivalent worker.celery.serviceAccountName helper was created.

There is no corresponding worker.celery.serviceAccountName.
https://github.com/apache/airflow/blob/helm-chart/1.21.0/chart/templates/_helpers.yaml#L724-L736

Operating System

PRETTY_NAME="Debian GNU/Linux 12 (bookworm)" 
NAME="Debian GNU/Linux" 
VERSION_ID="12" 
VERSION="12 (bookworm)" 
VERSION_CODENAME=bookworm 
ID=debian 
HOME_URL="https://www.debian.org/" 
SUPPORT_URL="https://www.debian.org/support" 
BUG_REPORT_URL="https://bugs.debian.org/"

Deployment

Official Apache Airflow Helm Chart

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

No response

Official Helm Chart version

1.21.0 (latest released)

Kubernetes Version

Server is v1.33.10 (EKS), client is v1.30.2.

Helm Chart configuration

No response

Docker Image customizations

Not applicable

Anything else?

Every time

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:helm-chartAirflow Helm Chartkind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions