Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kustomize/api to v0.7.2 and disable kyaml #241

Merged
merged 2 commits into from
Jan 19, 2021

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Jan 17, 2021

This PR updates kustomize/api to v0.7.2 and disables kyaml when running kustomize build due to upstream bugs:

Note that when kyaml is enabled, Kustomizer.Run fails with Error: json: unsupported type: map[interface {}]interface {} without any hint to which object caused the error, making it impossible for Flux users to track down the incompatible manifest.

Also if a manifest contains duplicate keys, kyaml panics thus crashing the whole controller 馃槩

Fix: fluxcd/flux2#729
Fix: #243

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
@stefanprodan stefanprodan added the area/ci CI related issues and pull requests label Jan 17, 2021
Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

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

Can you provide information on what this change incorporates and how it fixes the issue referenced to in the PR? Either in-code or in the commit message.

@stefanprodan stefanprodan changed the title Update kustomize/api to v0.7.2 Update kustomize/api to v0.7.2 and disable kyaml Jan 18, 2021
@stefanprodan stefanprodan added area/kustomize Kustomize related issues and pull requests bug Something isn't working labels Jan 18, 2021
@stefanprodan stefanprodan force-pushed the kustomize/api-v0.7.2 branch 2 times, most recently from ccf4f02 to 5a37e19 Compare January 18, 2021 11:12
Workaround for upstream bug: kubernetes-sigs/kustomize#3446

Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
Comment on lines +282 to +289
// buildKustomization wraps krusty.MakeKustomizer with the following settings:
// - disable kyaml due to critical bugs like:
// - https://github.com/kubernetes-sigs/kustomize/issues/3446
// - https://github.com/kubernetes-sigs/kustomize/issues/3480
// - reorder the resources just before output (Namespaces and Cluster roles/role bindings first, CRDs before CRs, Webhooks last)
// - load files from outside the kustomization.yaml root
// - disable plugins except for the builtin ones
// - prohibit changes to resourceIds, patch name/kind don't overwrite target name/kind
Copy link
Member

Choose a reason for hiding this comment

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

馃挴

@stefanprodan stefanprodan merged commit 3a09ac6 into main Jan 19, 2021
@stefanprodan stefanprodan deleted the kustomize/api-v0.7.2 branch January 19, 2021 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci CI related issues and pull requests area/kustomize Kustomize related issues and pull requests bug Something isn't working
Projects
None yet
2 participants