-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Official Helm Chart version
1.18.0 (latest released)
Apache Airflow version
initContainers in scheduler, triggerer use inconsistent log volume configs
Kubernetes Version
1.32
Helm Chart configuration
No response
Docker Image customizations
No response
What happened
In the scheduler, worker, and triggerer, the wait-for-airflow-migrations initContainer uses inconsistent /usr/local/airflow/log configurations (none) while the main containers uses a tailored /usr/local/airflow/log configuration. This creates an inconsistency between containers that run airflow. In my specific use case, this is preventing me from adding a container securityContext.readOnlyRootFilesystem: true because I am unable to create an emptyDir for /usr/local/airflow/logs for the airflow components to write to. If I set that config, I can't deploy because that volume already exists in the scheduler container, but if I do not set it, the wait-for-airflow-migrations fails because the logs dir is read-only.
What you think should happen instead
All components in a pod that run airflow should have consistent volume handling.
How to reproduce
Install with these extra values:
scheduler:
extraVolumeMounts:
- mountPath: /usr/local/airflow/logs
name: airflow-logs
- mountPath: /tmp
name: tmp
extraVolumes:
- emptyDir: {}
name: airflow-logs
- emptyDir: {}
name: tmp
securityContexts:
containers:
readOnlyRootFilesystem: true
Also try it with the airflow-logs volume and volumeMount removed.
Anything else
I am not reporting any problems with readOnlyRootFilesystem, just the volume problem, which was found when configuring readOnlyRootFilesystem.
- initContainer volume: https://github.com/apache/airflow/blob/main/chart/templates/scheduler/scheduler-deployment.yaml#L150-L165
- the missing configs: https://github.com/apache/airflow/blob/main/chart/templates/scheduler/scheduler-deployment.yaml#L289-L303
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct