-
Notifications
You must be signed in to change notification settings - Fork 276
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
Kustomize 3.8.0 builds an invalid CRD manifest in K8s 1.17 #201
Comments
Kubectl packages kustomize, and is pinned at v2.0.3. As for v3.8.0, the release notes claim that the output of kustomize will change due to them switching from apimachinery to kyaml, but that this should only break brittle yaml validation tests. Without looking into this further (yet), this could be an issue with 3.8.0. |
Worth checking if 3.8.1 fixed this. |
I've confirmed that this issue is fixed in 3.8.1:
|
It seems that 3.8.1 still causes issues - while the deploy stage succeeds on 3.8.1, the operator hits an exception when attempting to create a RabbitmqCluster:
|
Here's the output of the kustomize build command on 3.7.0 and 3.8.0. It's clear that the storedVersions property disappeared in 3.8.0, hence why we saw failures. This field returns in 3.8.1.
It seems that the issue that we're hitting now is apparently around the status subresource that disappears between 3.7.0 and 3.8.1:
|
Looks like others are hitting the same issue as us - kustomize 3.8+ is stripping out values that are nil or {}. So our template: spec:
subresources:
status: {} is getting stripped to: spec:
subresources: {} Note it's not recursive. If I add a child key:value to status: spec:
subresources:
status:
foo: {} It only removes the bottommost resource: spec:
subresources:
status: {} |
The information here is good; tracking in kubernetes-sigs/kustomize#2734 |
Looks like there's a PR now to fix this: kubernetes-sigs/kustomize#2805 |
kubernetes-sigs/kustomize#2805: Has been merged in master but not released yet. |
Kustomize 3.8.2 has been released, with our bug fix in: https://github.com/kubernetes-sigs/kustomize/releases/tag/kustomize%2Fv3.8.2 |
Please remember to remove the 1.18 incompatibility notice once this is delivered: https://www.rabbitmq.com/kubernetes/operator/install-operator.html#compatibility |
I can reproduce this issue with kustomize 3.8.0 against K8s 1.17. However, kustomize 3.8.0 works fine against K8s 1.18:
Given that this is fixed in kustomize 3.8.2, since we don't specify the kustomize version in this repo, I don't see anything to be done in this repo. I therefore close this issue. @Zerpet @coro @ferozjilla @mkuratczyk let me know if you think something needs to be done here. In future we should all use the same kustomize version. I therefore update #306 to include kustomize in the go tools. |
make deploy
finished with error to deploy the CRD manifest:However,
kubectl deploy -k config/crd
works as expected. Tested this withkustomize
3.7.0 and it doesn't returns this error during apply.We should check if there are any breaking changes or any action required from our side to use the latest
kustomize
version, or document the limitation if there is no action.The text was updated successfully, but these errors were encountered: