Skip to content

fix empty kustomization.yaml error #304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged

Conversation

cbarbian-sap
Copy link
Contributor

@cbarbian-sap cbarbian-sap commented Jun 10, 2025

If an empty kustomization is generated (that is: Resources == [], the serialized output is missing the resources attribute because of an omitempty tag in the API definition. Unfortunately kustomize rejects such a kustomization.yaml with an error "kustomization.yaml is empty". As a workaround, when the framework auto-generates a kustomization.yaml without any resources, we set a dummy namespace in the kustomization.yaml (this is - btw- the same workaround that is implemented by flux).

@cbarbian-sap cbarbian-sap merged commit b298f82 into main Jun 11, 2025
9 checks passed
@cbarbian-sap cbarbian-sap deleted the fix-empty-kustomization branch June 11, 2025 08:13
@cbarbian-sap cbarbian-sap linked an issue Jun 11, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Empty kustomization directory leads to error message
1 participant