Search code examples
kuberneteschartsairflowkubernetes-helmkubernetes-statefulset

Airflow Helm Chart - why stateful set is used for worker definition?


I am deploying Airflow with official Helm chart and trying to understand why it requires stateful set for worker deployment. When it makes perfect sense for redis and postgtre I am not sure why this is requirement for worker


Solution

  • Actually, in the official Helm chart, they choose between statefulset and deployment to deploy your workers, based on your persistence configurations:

    • if it's enabled (by default), they use the StatefulSet in order to create the PVC which will create a PV per pod.
    • and if it's disabled, they use the deployment

    Here is the link to the condition they use to choose between the two ressources.