Custom Resource for Worker Template #9981
Labels
area:helm-chart
Airflow Helm Chart
kind:feature
Feature Requests
provider:cncf-kubernetes
Kubernetes provider related issues
Hello,
Airflow has the ability to define what a pod created by KubernetesExecutor will look like in two ways:
git_repo
,git_branch
,git_sync_depth
,git_subpath
,git_sync_rev
,git_user
,git_password
,git_sync_root
,git_sync_dest
,git_dags_folder_mount_point
,git_ssh_key_secret_name
,git_ssh_known_hosts_configmap_name
,git_sync_credentials_secret
,git_sync_container_repository
,git_sync_container_tag
,git_sync_init_container_name
,git_sync_run_as_user
However, it is problematic to pass this file from Helm. We have to run the helm twice. First time to generate pod_template_file, then the second time to generate a configuration for Airflow. It's caused by inconsistency between ecosystems.
We can keep the pod template in the Custom Resource. In Kubernetes, this approach is common. It has a lot of PodTemplate build-in in the core e.g. Deployment, Jobs, DeamonSets.
API Reference for PodTemplateSpec: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#podtemplatespec-v1-core
An additional benefit will be the ability to change the configuration without restarting the scheduler. We can automation that watches for updates on the new resource version.
An example template might look like below
If anyone is interested in this task, I am happy to support
What do you think about this approach? Is this the direction Airflow should go?
The text was updated successfully, but these errors were encountered: