Repository navigation
Smoke test kustomize overlays and add tested Kerberos - #67012
Conversation
4968db1 to
e86bf42
Compare
0eaf436 to
2d11aba
Compare
2d11aba to
5cdca15
Compare
|
CI not related wanted to rebase but failed :( |
db042a2 to
ec6f031
Compare
Miretpl
left a comment
There was a problem hiding this comment.
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:
- Refresh credentials in the cache file, which are refreshed with the keytab file usage
- Properly configure the Airflow configuration within the existing components in the cluster
- 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:
- running overlay first
- 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 :) |
Miretpl
left a comment
There was a problem hiding this comment.
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 :|
19f65c7 to
3589bd9
Compare
…cument the improvements
…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: Jens Scheffler <[email protected]>
Co-authored-by: Przemysław Mirowski <[email protected]>
Co-authored-by: Przemysław Mirowski <[email protected]>
b4c60c3 to
f8cb158
Compare
|
Many thanks all! |
Smoke tests provide both semantic definitions tests over STATUS.yaml and python tests under the
chart/tests/.If the
verifystatement exists, the CI will pick up those overlays; we should promote these locally via testing. Otherwise, if we addverify, the CI will fail if the non-tests stateHow to test
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 deleteWas generative AI tooling used to co-author this PR?
Claude Opus 4.7
{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.