Skip to content

Can't configure Kubernetes and Celery workers in Helm Chart #28880

Description

@csp33

Official Helm Chart version

1.7.0 (latest released)

Apache Airflow version

2.4.3

Kubernetes Version

1.25

Helm Chart configuration

No response

Docker Image customizations

No response

What happened

Current Helm chart uses the "workers" section to configure Kubernetes or Celery workers parameters (resources, affinity, etc.).
However, when using CeleryKubernetesExecutor, the "workers" section is used to configure the Celery ones, making Kubernetes workers settings available only via podTemplateFile, which can be difficult to manage.

I suggest splitting "workers" into "kubernetesWorkers" (used in pod_template_file) and "celeryWorkers" (used by the celery ones)

What you think should happen instead

Helm Chart should allow to configure both kind of workers in an easy way

How to reproduce

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. potiuk commented on Jan 19, 2023

    @potiuk
    Member

    Why not - if someoene would like to pick it, i marked it as good first issue.

  2. csp33 commented on Jan 20, 2023

    @csp33
    ContributorAuthor

    I could take this one. How about this proposal? values defined at the "workers" level will be taken by both celery & k8s.

    workers:
      safeToEvict: false
      celery:
        resources: 
          limits:
            cpu: 1
            memory: 1Gi
          requests:
            cpu: 1
            memory: 1Gi
      kubernetes:
        resources:
          limits:
            cpu: 240m
            memory: 875Mi
          requests:
            cpu: 240m
            memory: 875Mi

    @potiuk

  3. potiuk commented on Jan 21, 2023

    @potiuk
    Member

    Just make a PR - we (or others) can easier discuss it there.

  4. amoghrajesh commented on Feb 19, 2023

    @amoghrajesh
    Contributor

    @potiuk if nobody is actively working on this, I would like to take it up.

  5. potiuk commented on Feb 19, 2023

    @potiuk
    Member

    Feel free

  6. eladkal commented on Aug 4, 2024

    @eladkal
    Contributor

    Is this problem still relevant? It's mostly about CeleryKubernetesExecutor which is no longer needed after AIP-61.

  7. rcheatham-q commented on Aug 5, 2024

    @rcheatham-q

    Yes this is still an issue because this is more of an issue with the helm chart than it is about the specific executor. If someone wants to configure both a Celery executor and a Kubernetes executor after 2.10 releases they will still encounter this issue.

  8. SKisContent commented on Aug 23, 2024

    @SKisContent

    @potiuk Here's the PR as requested upthread: #41628

  9. SKisContent commented on Aug 23, 2024

    @SKisContent

    @eladkal HI, I don't know what the reference to AIP-61 would mean, but we are using CeleryKubernetesExecutor in Airflow v2.8.3. We don't want to fork our own version of the Helm chart, but the existing chart does not permit us to specify separate resource requirements for the Celery and Kubernetes workers. Since the Helm values file schema does not permit any additional sections, the accommodation needs to happen upstream. Here is a PR for that: #41628

  10. eladkal commented on Aug 23, 2024

    @eladkal
    Contributor

    @eladkal HI, I don't know what the reference to AIP-61 would mean, but we are using CeleryKubernetesExecutor in Airflow v2.8.3.

    AIP-61 means Hybrid Executors. It was released in Airflow 2.10 (see release notes)
    This means that we don't need another dedicated executor for any 2 types of executors like: CeleryExecutor + KubernetesExecutor = new CeleryKubernetesExecutor. You can simply have a list of executors as [CeleryExecutor, KubernetesExecutor]
    See docs: https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/index.html#statically-coded-hybrid-executors

  11. Miretpl commented on Jan 5, 2026

    @Miretpl
    Contributor

    I slowly started working on resolving this issue by introducing workers.celery and workers.kubernetes sections. Below is the list of all commands under workers and their status (41/41 merged):

    As most of these changes will be overlapping and in one huge PR, it could be hard to merge and review (I prepared some time ago one big PR with a change #51460), I plan to do the next PR with the next field after the merge of the previous one.

  12. henry3260 commented on Jan 15, 2026

    @henry3260
    Contributor

    I slowly started working on resolving this issue by introducing workers.celery and workers.kubernetes sections. Below is the list of all commands under workers and their status (12/41 merged):

    As most of these changes will be overlapping and in one huge PR, it could be hard to merge and review (I prepared some time ago one big PR with a change #51460), I plan to do the next PR with the next field after the merge of the previous one.

    This looks like a huge workload. Do you mind if I pick up some of these files to help lighten the load?

  13. Miretpl commented on Jan 15, 2026

    @Miretpl
    Contributor

    Not at all. Feel free to take some. Just let me know when you will take something. I will link it in the comment above and do a review too

  14. henry3260 commented on Jan 15, 2026

    @henry3260
    Contributor

    Not at all. Feel free to take some. Just let me know when you will take something. I will link it in the comment above and do a review too

    Awesome! Let's get this done. I will handle kerberosInitContainer #60427
    Feel free to review my pr :)

  15. Miretpl commented on Jan 15, 2026

    @Miretpl
    Contributor

    I linked it above. I wasn't quick enough to make a review before the merge tho. Could you take a look at my comments? I believe we should make changes consistent, in terms of behaviour, within the whole workers -> workers.celery/kubernetes move

  16. henry3260 commented on Jan 16, 2026

    @henry3260
    Contributor

    I linked it above. I wasn't quick enough to make a review before the merge tho. Could you take a look at my comments? I believe we should make changes consistent, in terms of behaviour, within the whole workers -> workers.celery/kubernetes move

    Sure! Appreciate your reviewing

  17. henry3260 commented on Feb 25, 2026

    @henry3260
    Contributor

    Not at all. Feel free to take some. Just let me know when you will take something. I will link it in the comment above and do a review too

    Can I take logGroomerSidecar, labels, if they are still avaliable?

  18. Miretpl commented on Feb 25, 2026

    @Miretpl
    Contributor

    To be honest, not sure really. In general, they are available, as I didn't start creating PRs for them, but it is mostly because there are many PRs already created, which are waiting for one-by-one merge. I think after the 1.19 release and dropping support for <2.11 versions, we will be going forward with merging them slowly, but it is hard to estimate when merging e.g. logGroomerSidecar would be the best (in some of the already created PRs, I needed to refactor some e.g. test cases to smoothen further changes, but until the merge of particular PR, basically creating a PR for aftected fields would be a work which would need to be repeated after it).

    I have some things to do along with this one issue, so if that would be ok with you, we could do it in a way that when we get to the end with merging already created PRs, and somewhere along this way, I will not have a time to create next PRs (due to these different things to do), you could take this up (I would let you know here). What do you think?

  19. henry3260 commented on Feb 26, 2026

    @henry3260
    Contributor

    To be honest, not sure really. In general, they are available, as I didn't start creating PRs for them, but it is mostly because there are many PRs already created, which are waiting for one-by-one merge. I think after the 1.19 release and dropping support for <2.11 versions, we will be going forward with merging them slowly, but it is hard to estimate when merging e.g. logGroomerSidecar would be the best (in some of the already created PRs, I needed to refactor some e.g. test cases to smoothen further changes, but until the merge of particular PR, basically creating a PR for aftected fields would be a work which would need to be repeated after it).

    I have some things to do along with this one issue, so if that would be ok with you, we could do it in a way that when we get to the end with merging already created PRs, and somewhere along this way, I will not have a time to create next PRs (due to these different things to do), you could take this up (I would let you know here). What do you think?

    Makes total sense. It's better to avoid repeated work due to refactoring in other PRs. I'm happy to wait for the current queue to clear up a bit. Just ping me here whenever you'd like me to jump in, and I'll take it from there. Thanks for the heads-up!

  20. jscheffl commented on Apr 12, 2026

    @jscheffl
    Contributor

    Wow, cool!

  21. n-badtke-cg commented on Apr 27, 2026

    @n-badtke-cg
    Contributor

    @Miretpl the goat :D thank you <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions