-
Notifications
You must be signed in to change notification settings - Fork 377
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
Update volume snapshot CRDs to v1 version #367
Update volume snapshot CRDs to v1 version #367
Conversation
Welcome @prateekpandey14! |
Hi @prateekpandey14. Thanks for your PR. I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/ok-to-test |
Thanks @prateekpandey14 for the PR! |
8982b4d
to
0cd30c2
Compare
@xing-yang pushed the changes, should i remove the step-4 about the |
Yes, please remove the metadata section as described in README. |
0cd30c2
to
88fd640
Compare
Done @xing-yang |
/assign @yuxiangqian |
Hi @yuxiangqian, can you take a look of this? |
@prateekpandey14 @xing-yang I'd like to hold-on this PR before #353 is merged. Any concerns? |
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @prateekpandey14 when i have tested this in my enviorment , then these crd not generated succesfully could you please remove this metadata section from all yaml files that are generated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh, i forget to commit the changes, i have them locally, i will do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please commit the changes? and do we still need to manually remove this metadata after switching to use: crd:crdVersions=v1 in the controller-gen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuxiangqian, I just read comments left by you in the README where you said we should no longer need to remove this metadata when we move to v1? However @Kartik494 seems to run into problems if these metadata sections are left there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering whether that issue is a problem related to the controller-gen or v1beta1 apiextension. its better if we could remove as much manual editing to the generated yaml file as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree that we should do as little manual editing as possible. Just need to verify that these manifests are working.
Hi @xing-yang if i am not wrong here the idea is to remove metadata section from the yaml not from the README! Please suggest |
Yes, don't remove from README! That's a documented step that needs to be done manually. |
No problem. |
/hold |
Sure @yuxiangqian make sense, it will be good to wait for validation webhook to get merge and then jump on this PR |
#353 is merged. /hold cancel |
Hi @prateekpandey14, the webhook PR is merged. Can you please rebase and address the comments? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@prateekpandey14 could you please push your latest version? WIP
object represents. Servers may infer this from the endpoint the client | ||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' | ||
type: string | ||
metadata: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please commit the changes? and do we still need to manually remove this metadata after switching to use: crd:crdVersions=v1 in the controller-gen?
client/hack/update-crd.sh
Outdated
@@ -39,7 +39,7 @@ then | |||
exit 1; | |||
fi | |||
|
|||
$CONTROLLER_GEN crd:trivialVersions=true,preserveUnknownFields=false paths=${SCRIPT_ROOT}/apis/volumesnapshot/v1beta1 | |||
$CONTROLLER_GEN crd:crdVersions=v1,trivialVersions=true,preserveUnknownFields=false paths=${SCRIPT_ROOT}/apis/volumesnapshot/v1beta1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preserveUnknownFields=false is now redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yuxiangqian can you explain why it is redundant now? What does preserveUnknownFields=false mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preserveUnknownFields=false is there in v1beta1 apiextensions to prevent adding a CR with unknown/undefined fields persisted. However, that's no longer needed in v1 apiextension according to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the preserveUnknownFields=false
flag
88fd640
to
44be5d1
Compare
- bump controller-gen 0.4.0 version - update CRDs to use `apiextensions.k8s.io/v1` apis Signed-off-by: prateekpandey14 <[email protected]>
44be5d1
to
c1e1a1b
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: prateekpandey14, xing-yang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: prateekpandey14 [email protected]
What type of PR is this?
What this PR does / why we need it:
Update the volume snapshot CRDs to
apiextensions.k8s.io/v1
.FYI as per kubernetes/kubernetes#82022 (comment) removal of
apiextensions.k8s.io/v1beta1
has been targeted for 1.22Which issue(s) this PR fixes:
Fixes #364
Special notes for your reviewer:
Does this PR introduce a user-facing change?: