Skip to content

Conversation

@rich7420
Copy link
Contributor

@rich7420 rich7420 commented Oct 6, 2025

related: #56015

How I Fixed It in this PRr

I added the missing logs volume mount to the wait-for-airflow-migrations initContainers in these files:

  • chart/templates/scheduler/scheduler-deployment.yaml
  • chart/templates/triggerer/triggerer-deployment.yaml
  • chart/templates/workers/worker-deployment.yaml

Test

Test 1: Reproduce the Original Problem

Grab this values file to mimic the issue:

# test-original-issue.yaml
scheduler:
  extraVolumeMounts:
  - mountPath: /usr/local/airflow/logs
    name: airflow-logs
  - mountPath: /tmp
    name: tmp
  extraVolumes:
  - emptyDir: {}
    name: airflow-logs
  - emptyDir: {}
    name: tmp

triggerer:
  extraVolumeMounts:
  - mountPath: /usr/local/airflow/logs
    name: airflow-logs
  - mountPath: /tmp
    name: tmp
  extraVolumes:
  - emptyDir: {}
    name: airflow-logs
  - emptyDir: {}
    name: tmp

workers:
  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

Run this to check:

helm template test-release chart/ -f test-original-issue.yaml | grep -A 25 "wait-for-airflow-migrations"

What you should see is all initContainers now have both the standard logs volume and any extra mounts—no more mismatches.

Test 2: With Persistence Enabled

Try this values file for persistent logs:

# test-persistence.yaml
logs:
  persistence:
    enabled: true
    subPath: "airflow-logs"

Check it out:

helm template test-release chart/ -f test-persistence.yaml | grep -A 25 "wait-for-airflow-migrations"

What you should see is InitContainers include the logs volume with the right subPath config.

Test 3: Just the Basics

No extra bells and whistles—test the default setup:

# test-minimal.yaml
# Empty file, basically defaults only

Run:

helm template test-release chart/ -f test-minimal.yaml | grep -A 25 "wait-for-airflow-migrations"

Then you should see Every initContainer has the standard logs volume mount, loud and clear.

Any Breaking Changes?

Nope, none at all.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

Copy link
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for the PR.
It would be nice to update the helm-tests as well. Thanks!

@rich7420
Copy link
Contributor Author

@jason810496 Thanks for your suggestion. I've added helm-tests .

@Miretpl
Copy link
Contributor

Miretpl commented Nov 25, 2025

Hi @rich7420, some tests are failing. Could you take a look?

@rich7420 rich7420 requested a review from jscheffl as a code owner November 26, 2025 14:39
@rich7420
Copy link
Contributor Author

@Miretpl thanks for the reminding! I'll try to fix it up as soon as possible.

Copy link
Contributor

@Miretpl Miretpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for the fix!

Copy link
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!
It would be nice to test with breeze k8s command, thanks!

https://github.com/apache/airflow/blob/cc16dd60ac78ffff9e2b6c49a3afac677adcd92c/contributing-docs/testing/k8s_tests.rst

@rich7420
Copy link
Contributor Author

@jason810496 I've tried test with breeze k8s.
results below:
=========================== short test summary info ============================
SKIPPED [1] tests/kubernetes_tests/test_kubernetes_pod_operator.py:1495: AIP-72: Secret Masking yet to be implemented
SKIPPED [1] tests/kubernetes_tests/test_other_executors.py:29: Does not run on KubernetesExecutor
SKIPPED [1] tests/kubernetes_tests/test_other_executors.py:52: Does not run on KubernetesExecutor
============ 56 passed, 3 skipped, 63 warnings in 676.90s (0:11:16) ============

@jscheffl jscheffl added the area:helm-chart Airflow Helm Chart label Dec 7, 2025
@jscheffl jscheffl added this to the Airflow Helm Chart 1.19.0 milestone Dec 7, 2025
@jscheffl jscheffl merged commit 3935c86 into apache:main Dec 7, 2025
86 checks passed
@rich7420
Copy link
Contributor Author

rich7420 commented Dec 8, 2025

Thanks @jscheffl , @jason810496 , @Miretpl !

amoghrajesh pushed a commit to astronomer/airflow that referenced this pull request Dec 8, 2025
…t log volume (apache#56418)

* fix logs mount

* helm test

* fix error

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

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants