Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm chart fails with multiple executors #46733

Open
2 tasks done
alecsg77 opened this issue Feb 13, 2025 · 5 comments
Open
2 tasks done

Helm chart fails with multiple executors #46733

alecsg77 opened this issue Feb 13, 2025 · 5 comments
Labels
area:helm-chart Airflow Helm Chart kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet

Comments

@alecsg77
Copy link

alecsg77 commented Feb 13, 2025

Official Helm Chart version

main (development)

Apache Airflow version

2.10.5

Kubernetes Version

k3s version v1.31.5+k3s1

Helm Chart configuration

config:
  webserver:
    expose_config: 'True'
webserverSecretKeySecretName: airflow-webserver-secret-key
executor: "CeleryExecutor,KubernetesExecutor"
createUserJob:
  useHelmHooks: false
  applyCustomEnv: false
migrateDatabaseJob:
  useHelmHooks: false
  applyCustomEnv: false
ingress:
  web:
    enabled: true
    ingressClassName: tailscale
    hosts:
      - airflow
    tls:
      enabled: true
dags:
  persistence:
    enabled: true
  gitSync:
    enabled: false

Docker Image customizations

None

What happened

Helm upgrade failed for release airflow/airflow with chart airflow@1.16.0-dev:
cannot patch "airflow-scheduler" with kind Deployment: Deployment.apps "airflow-scheduler" is invalid: metadata.labels: Invalid value: "CeleryExecutor,KubernetesExecutor": a valid label must be an empty string or consist of alphanumeric characters, ''-'', '''' or ''.'', and must start and end with an alphanumeric character (e.g. ''MyValue'', or ''my_value'', or ''12345'', regex used for validation is ''(([A-Za-z0-9][-A-Za-z0-9.]*)?[A-Za-z0-9])?'')'

What you think should happen instead

Successfully update the chart and use the multiple executors feature.

How to reproduce

  • install airflow using the latest official chart (1.15.0)
  • git clone airflow repo and checkout main
  • helm upgrade -f values.yaml airflow ./char/ --namespace airflow

Anything else

Linked to #43224
Scheduler deployment sets a label executor without considering that the executor should be on a comma-separated list.

executor: "{{ .Values.executor }}"

Two possible solutions:

  1. use the first executor in the list as the note in the config section suggests as the default executor (ignoring the others)
  2. generate multiple labels (executor, executor-1, executor-2, ...) for each executor in the list

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@alecsg77 alecsg77 added area:helm-chart Airflow Helm Chart kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Feb 13, 2025
Copy link

boring-cyborg bot commented Feb 13, 2025

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@eladkal
Copy link
Contributor

eladkal commented Feb 13, 2025

cc @krisgeus can you take a look? It seems that #46039 doesn't work as expected?

@alecsg77
Copy link
Author

I tested the fix in the two scenarios.

  • From scratch: helm installation works fine, and the website displays the proper configuration. I missed testing if the dags are working as expected.
  • Update from 1.15.0 to 1.16.0-dev: failed due to cannot patch "airflow-create-user" with kind Job: Job.batch "airflow-create-user"

@krisgeus
Copy link
Contributor

krisgeus commented Feb 14, 2025

@alecsg77 @eladkal I can have a look at this. Is the 1.16.0-dev chart available in a helm repo? Could you give me a hint on how to find that release? Could not find it online in the docs and can only see the stable versions. I tried

helm repo add apache-airflow https://airflow.apache.org
helm repo update
helm search repo apache-airflow --versions --devel

@alecsg77
Copy link
Author

The dev helm chart is available from the source, or at least it's where I took it.
You have to git clone airflow repo and checkout main, then install it from local
helm install -f values.yaml airflow ./char/ --namespace airflow

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 kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet
Projects
None yet
Development

No branches or pull requests

3 participants