Skip to content

Introduce v1beta2 VolumeGroupSnapshot API #1312

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leonardoce
Copy link
Contributor

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:

This commit introduces the new VolumeGroupSnapshot v1beta2 API, updates the CRD, and the generated code.

Both v1beta1 and v1beta2 APIs are served, with v1beta1 being the stored version.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Important: this is only the first of a series of PR that will lead to all the changes needed to implement KEP 5013.

With this PR applied, the new version, v1beta2, will be served but not used.
v1beta1 is still the stored version, and no conversion is configured.

Does this PR introduce a user-facing change?:

Introduce the `v1beta2` VolumeGroupSnapshot API as described by [KEP 5013](https://github.com/kubernetes/enhancements/pull/5013)

This commit introduces the new VolumeGroupSnapshot v1beta2 API, updates
the CRD and the generated code.

Both v1beta1 and v1beta2 APIs are served, with v1beta1 being the stored
version.
@k8s-ci-robot k8s-ci-robot added kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Jun 25, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: leonardoce
Once this PR has been reviewed and has the lgtm label, please assign yuxiangqian for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@k8s-ci-robot k8s-ci-robot requested review from pohly and RaunakShah June 25, 2025 16:00
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 25, 2025
package v1beta2

import (
core_v1 "k8s.io/api/core/v1"
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be corev1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, and in other places, the same package is referred to as v1.
We should decide on a name and stick with it.

In this PR, I believe it is better to keep this file as similar as the sibling in v1beta1 as possible.
I decided to update only the new files without touching the existing ones: this will make reviewing easier.

Shall we choose a name and handle it in a different PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

sounds good.

@Madhu-1
Copy link
Contributor

Madhu-1 commented Jun 26, 2025

/lgtm
/assign @xing-yang

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 26, 2025
@xing-yang
Copy link
Collaborator

@@ -1,5 +1,5 @@
/*
Copyright 2024 The Kubernetes Authors.
Copyright 2025 The Kubernetes Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this changed? Same comment in other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this happened because I regenerated these files.
We could avoid putting this changes into the patch if you think it makes easier to review it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right. VolumeGroupSnapshot v1beta1 and VolumeSnapshot v1 related files should not be changed.

- driver
type: object
served: true
storage: false
Copy link
Collaborator

Choose a reason for hiding this comment

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

v1beta2 should have storage: true.
Same in other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It should be definitely set to true when v1beta2 will become the "default" API, but in this moment we're internally not using it and we've no conversion webhook.
I was thinking to do it later, if you agree with me.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add that this will be changed in follow up PRs in the PR description?

@@ -92,3 +92,77 @@ spec:
served: true
storage: true
Copy link
Collaborator

Choose a reason for hiding this comment

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

v1beta1 should have storage: false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same as #1312 (comment)

@@ -2,7 +2,7 @@
// +build !ignore_autogenerated

/*
Copyright 2024 The Kubernetes Authors.
Copyright 2025 The Kubernetes Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should not be updated.

@@ -1,5 +1,5 @@
/*
Copyright 2024 The Kubernetes Authors.
Copyright 2025 The Kubernetes Authors.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This and other volumesnapshot v1 related files should not be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants