Skip to content

scheduler, triggerer, worker airflow components have inconsistent log volume #56015

@danielhoherd

Description

@danielhoherd

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.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions