Skip to content

Smoke test kustomize overlays and add tested Kerberos - #67012

Merged
bugraoz93 merged 26 commits into
apache:mainfrom
bugraoz93:smoke-test-kustomize-overlays
Jul 2, 2026
Merged

bugraoz93 merged 26 commits into
apache:mainfrom
bugraoz93:smoke-test-kustomize-overlays

Conversation

@bugraoz93

@bugraoz93 bugraoz93 commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Smoke tests provide both semantic definitions tests over STATUS.yaml and python tests under the chart/tests/.
If the verify statement exists, the CI will pick up those overlays; we should promote these locally via testing. Otherwise, if we add verify, the CI will fail if the non-tests state
How to test

breeze k8s setup-env
breeze k8s create-cluster
breeze k8s configure-cluster
breeze k8s build-k8s-image --rebuild-base-image  
breeze k8s upload-k8s-image                 
breeze k8s deploy-airflow
breeze k8s smoke-test-overlay kerberos --promote-status
Screencast.from.2026-05-15.21-49-27.mp4
chart/kustomize-overlays/NAME/         ──>  breeze k8s smoke-test-overlay
    kustomization.yaml + STATUS.yaml             │
                                                 ▼
                                     render + auto-discover images
                                                 │
                                                 ▼
                                         docker pull + kind load
                                                 │
                                                 ▼
                                              kubectl apply
                                                 │
                                                 ▼
                                  walk verify:  fail-fast on
                                  ImagePullBackOff / CrashLoopBackOff / ...
                                                 │
                                                 ▼
                                    optional pytest  test_NAME.py
                                                 │
                            ┌────────────────────┴────────────────────┐
                            │ --promote-status                cleanup │
                            ▼                                         ▼
                  STATUS.yaml flips to tested              kubectl delete

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)
    Claude Opus 4.7

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@bugraoz93

Copy link
Copy Markdown
Contributor Author

cc: @Miretpl and @wolfdn

@bugraoz93
bugraoz93 force-pushed the smoke-test-kustomize-overlays branch from 4968db1 to e86bf42 Compare May 15, 2026 20:14
@bugraoz93
bugraoz93 force-pushed the smoke-test-kustomize-overlays branch from 0eaf436 to 2d11aba Compare May 15, 2026 21:54
@bugraoz93
bugraoz93 force-pushed the smoke-test-kustomize-overlays branch from 2d11aba to 5cdca15 Compare May 19, 2026 20:09
@bugraoz93

Copy link
Copy Markdown
Contributor Author

CI not related wanted to rebase but failed :(

@bugraoz93
bugraoz93 force-pushed the smoke-test-kustomize-overlays branch 2 times, most recently from db042a2 to ec6f031 Compare May 21, 2026 18:17

@Miretpl Miretpl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that the content of this PR is not sufficient to have a nice overview of the replacement of Kerberos by Kustomize. The current implementation adds a lot of code within the overlay itself, basically just to remove the kerberos-keytab-secret.yaml file logic (creation of kerberos keytab as a k8s secret), which I would say is the simplest thing within the whole kerberos feature logic. It doesn't try to:

  1. Refresh credentials in the cache file, which are refreshed with the keytab file usage
  2. Properly configure the Airflow configuration within the existing components in the cluster
  3. Share/propagate the credential cache within the components

When I proposed moving Kerberos to Kustomize, I had in mind a full movement of it with sidecars, Airflow configuration, etc., and I think that it would be worth doing it here, as it would show how similar things will look, which are not as simple as, e.g. KEDA, in Kustomize.


The second thing which I noticed is that the flow presented in the current version requires:

  1. running overlay first
  2. running helm chart second

Overlay creates a Kerberos secret, which must exist during helm command execution if Kerberos sidecars are enabled. I think the typical flow is helm -> overlay, not the other way around or mixed (I don't have much experience with Kustomize, so if that is not true, I think that we should make it clear within the overlays when exactly they should be executed).

@bugraoz93

bugraoz93 commented May 26, 2026 •

Copy link
Copy Markdown
Contributor Author

I think that the content of this PR is not sufficient to have a nice overview of the replacement of Kerberos by Kustomize. The current implementation adds a lot of code within the overlay itself, basically just to remove the kerberos-keytab-secret.yaml file logic (creation of kerberos keytab as a k8s secret), which I would say is the simplest thing within the whole kerberos feature logic. It doesn't try to:

  1. Refresh credentials in the cache file, which are refreshed with the keytab file usage
  2. Properly configure the Airflow configuration within the existing components in the cluster
  3. Share/propagate the credential cache within the components

When I proposed moving Kerberos to Kustomize, I had in mind a full movement of it with sidecars, Airflow configuration, etc., and I think that it would be worth doing it here, as it would show how similar things will look, which are not as simple as, e.g. KEDA, in Kustomize.

The second thing which I noticed is that the flow presented in the current version requires:

  1. running overlay first
  2. running helm chart second

Overlay creates a Kerberos secret, which must exist during helm command execution if Kerberos sidecars are enabled. I think the typical flow is helm -> overlay, not the other way around or mixed (I don't have much experience with Kustomize, so if that is not true, I think that we should make it clear within the overlays when exactly they should be executed).

Many thanks for the review! Sure, if the main concern is to change how we move Kerberos to kustomize and the test part looks good, glad to hear :) To be honest, I don't have too much experience with Kerberos, so guidance on how to best deploy would be great. I do have lots with K8S and how deployment works, so the smoke test part I am more confident :)
The order is the same as in the test. First helm applies, then kustomize applies. Maybe we should better document how the order will be. I will check that out too while making the proposed Kerberos changes.
I am working on RC for airflowctl and will come back to this in a day or two :)

@Miretpl Miretpl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Many thanks for the review! Sure, if the main concern is to change how we move Kerberos to kustomize and the test part looks good, glad to hear :) To be honest, I don't have too much experience with Kerberos, so guidance on how to best deploy would be great. I do have lots with K8S and how deployment works, so the smoke test part I am more confident :)

Ah, sorry, I forgot to mention that I didn't check fully CI-strickly related stuff as I needed to verify a couple of things. I don't know the Airflow CI by heart yet 😄. For me, mostly, it looks good. Regarding the Kubernetes tests, we are testing the kustomization itself strictly, but we do not test if the whole environment is working correctly after applying the overlay. I think that if something is tested, we should also have some, let's say, general tests which would tell "after applying that, the environment is working, it didn't break" by, e.g. checking the statuses of pods as a base (first type of tests which I miss).

The order is the same as in the test. First helm applies, then kustomize applies. Maybe we should better document how the order will be. I will check that out too while making the proposed Kerberos changes.

I meant more, to make it work, I mean to really use the current version of Kerberos overlay and helm chart, the kustomization should be added before the helm chart. Helm is relying on the secret produced by the overlay, so by making the order like helm -> overlay, the pods will fail with failure of attaching the keytab from the secret due to missing secret (in the current test, it doesn't fail, as the configuration of the deployed helm chart is not adjusted - the env is missing kerberos.enabled=true flag). In current tests, the testing of kustomization is fully separated from the configuration of the Helm chart deployment underneath (which is good to have that kind of tests). However, in some (if not most) cases, to really test if Kustomization is not breaking stuff and be confident to put tested mark in the status file, we would need integration tests with the possibility of Helm values.yaml file modifications before Airflow deployment to a kind cluster (the second thing which I think would be good to have).

I am working on RC for airflowctl and will come back to this in a day or two :)

No worries. My time sank to the bottom of the ocean a month or two ago :|

Comment thread chart/tests/overlay_tests/conftest.py Resolved
@bugraoz93
bugraoz93 force-pushed the smoke-test-kustomize-overlays branch 2 times, most recently from 19f65c7 to 3589bd9 Compare June 5, 2026 21:32
bugraoz93 and others added 22 commits July 2, 2026 18:30
…d one more check to kerberos to make custom tests stable
Co-authored-by: Przemysław Mirowski <[email protected]>
Co-authored-by: Przemysław Mirowski <[email protected]>
Co-authored-by: Przemysław Mirowski <[email protected]>
@bugraoz93
bugraoz93 force-pushed the smoke-test-kustomize-overlays branch from b4c60c3 to f8cb158 Compare July 2, 2026 16:30
@bugraoz93
bugraoz93 merged commit 9dd6dfb into apache:main Jul 2, 2026
6 checks passed
@bugraoz93

Copy link
Copy Markdown
Contributor Author

Many thanks all!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants