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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update volume snapshot CRDs to v1 version #367

Merged
merged 1 commit into from
Sep 16, 2020

Conversation

prateekpandey14
Copy link
Member

Signed-off-by: prateekpandey14 [email protected]

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake

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.22

Which issue(s) this PR fixes:
Fixes #364

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Update volume snapshot CRDs to apiextensions.k8s.io/v1 version

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 21, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @prateekpandey14!

It looks like this is your first PR to kubernetes-csi/external-snapshotter 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/external-snapshotter has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot
Copy link
Contributor

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 21, 2020
@xing-yang
Copy link
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 21, 2020
@xing-yang
Copy link
Collaborator

Thanks @prateekpandey14 for the PR!
Please go through https://github.com/kubernetes-csi/external-snapshotter/blob/master/client/hack/README.md#update-crdsh and make sure that you have followed some manual steps documented there.

@prateekpandey14
Copy link
Member Author

@xing-yang pushed the changes, should i remove the step-4 about the metadata.description from the README as well (as suggested)

@xing-yang
Copy link
Collaborator

Yes, please remove the metadata section as described in README.

@prateekpandey14
Copy link
Member Author

Yes, please remove the metadata section as described in README.

Done @xing-yang

@xing-yang
Copy link
Collaborator

/assign @yuxiangqian

@xing-yang
Copy link
Collaborator

Hi @yuxiangqian, can you take a look of this?

@yuxiangqian
Copy link
Contributor

@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:
Copy link
Member

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, that's right.

Copy link
Member Author

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.

Copy link
Contributor

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?

Copy link
Collaborator

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.

Copy link
Contributor

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.

Copy link
Collaborator

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.

@Kartik494
Copy link
Member

Yes, please remove the metadata section as described in README.

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

@xing-yang
Copy link
Collaborator

Yes, please remove the metadata section as described in README.

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.
Remove the metadata section documented in README from all the generated YAMLs.

@xing-yang
Copy link
Collaborator

@prateekpandey14 @xing-yang I'd like to hold-on this PR before #353 is merged. Any concerns?

No problem.

@xing-yang
Copy link
Collaborator

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 28, 2020
@prateekpandey14
Copy link
Member Author

@prateekpandey14 @xing-yang I'd like to hold-on this PR before #353 is merged. Any concerns?

Sure @yuxiangqian make sense, it will be good to wait for validation webhook to get merge and then jump on this PR

@xing-yang
Copy link
Collaborator

#353 is merged.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 29, 2020
@xing-yang
Copy link
Collaborator

Hi @prateekpandey14, the webhook PR is merged. Can you please rebase and address the comments? Thanks.

Copy link
Contributor

@yuxiangqian yuxiangqian left a 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:
Copy link
Contributor

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?

@@ -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
Copy link
Contributor

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?

Copy link
Collaborator

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?

Copy link
Contributor

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.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure.

Copy link
Member Author

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

- bump controller-gen 0.4.0 version
- update CRDs to use `apiextensions.k8s.io/v1` apis

Signed-off-by: prateekpandey14 <[email protected]>
@xing-yang
Copy link
Collaborator

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 16, 2020
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kubernetes 1.17.5 incompatible CRD API version
5 participants