-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
upgrades between CRDs are broken - kubectl explain not updated #95702
Comments
/sig api-machinery |
kubectl explain
not updated when updating CRD apiVersion to apiextensions.k8s.io/v1kubectl explain
DESCRIPTION not updated when updating CRD apiVersion to apiextensions.k8s.io/v1
kubectl explain
DESCRIPTION not updated when updating CRD apiVersion to apiextensions.k8s.io/v1
No openapi v2 schema is published for CRDs that set that to true (or omit that field in v1beta1 and are defaulted to true). Publishing the openapi v2 schema would trigger kubectl to do client-side validation, which would fail to send API objects containing arbitrary fields which the API server would allow (and which the CRD indicated it wanted to preserve).
If you have a v1beta1 CRD that set
In
No. /close |
@liggitt: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@liggitt thank you for your explained response :) |
/triage accepted |
What happened:
I'm getting an issue with kubectl explain (in my case networkaddonsconfig ) when upgrading from version with
apiextensions.k8s.io/v1beta1
toapiextensions.k8s.io/v1
, whereDESCRIPTION
is empty even if the updated crd has got the description fields updated.The solution I saw so far is to set
PreserveUnknownFields:false
, as also mentioned in this open issue on etcd-cluster-operator),however I find the solution troubling, as PreserveUnknownFields is deprecated and the alternative field does not support the value
False
.Is there an expected version where
PreserveUnknownFields
will be removed entirely?Is there a solution/workaround what to do when that happens?
What you expected to happen:
kubectl explain <crd>
should be updated with the new fields when applying the new CRD, and not present<empty>
field.How to reproduce it (as minimally and precisely as possible):
apiextensions.k8s.io/v1beta1
(added example yaml: crd_apiex_v1beta1.yaml)apiextensions.k8s.io/v1
(added example yaml: crd_apiex_v1.yaml)To check workaround using deprecated field:
apiextensions.k8s.io/v1beta1
(added example yaml: crd_apiex_v1beta1.yaml)apiextensions.k8s.io/v1
and deprecated fieldpreserveUnknownFields
(added example yaml: crd_apiex_v1_dep_workaround.yaml)Example yamls for easy recreated of problem:
crd_apiex_v1beta1.yaml:
crd_apiex_v1.yaml:
crd_apiex_v1_dep_workaround.yaml:
Anything else we need to know?:
I initially opened this in api-extentions but I think it's not regularly updated so also opened here. sorry for make it duplicate.
Environment:
kubectl version
):cat /etc/os-release
):uname -a
):The text was updated successfully, but these errors were encountered: