-
Notifications
You must be signed in to change notification settings - Fork 233
USHIFT-7518: Support volume group snapshots #7381
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
Merged
openshift-merge-bot
merged 1 commit into
openshift:main
from
jsafrane:USHIFT-7518-volume-group-snapshots
Sep 16, 2026
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
263 changes: 263 additions & 0 deletions
263
assets/components/csi-snapshot-controller/volumegroupsnapshotclasses.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,263 @@ | ||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
| annotations: | ||
| api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/1337" | ||
| controller-gen.kubebuilder.io/version: v0.15.0 | ||
| name: volumegroupsnapshotclasses.groupsnapshot.storage.k8s.io | ||
| spec: | ||
| group: groupsnapshot.storage.k8s.io | ||
| names: | ||
| kind: VolumeGroupSnapshotClass | ||
| listKind: VolumeGroupSnapshotClassList | ||
| plural: volumegroupsnapshotclasses | ||
| shortNames: | ||
| - vgsclass | ||
| - vgsclasses | ||
| singular: volumegroupsnapshotclass | ||
| scope: Cluster | ||
| versions: | ||
| # Don't offer v1beta1 API in OCP, it needs a conversion webhook. v1 and v1beta2 are compatible and served without conversion. | ||
| # - additionalPrinterColumns: | ||
| # - jsonPath: .driver | ||
| # name: Driver | ||
| # type: string | ||
| # - description: Determines whether a VolumeGroupSnapshotContent created through | ||
| # the VolumeGroupSnapshotClass should be deleted when its bound VolumeGroupSnapshot | ||
| # is deleted. | ||
| # jsonPath: .deletionPolicy | ||
| # name: DeletionPolicy | ||
| # type: string | ||
| # - jsonPath: .metadata.creationTimestamp | ||
| # name: Age | ||
| # type: date | ||
| # deprecated: true | ||
| # name: v1beta1 | ||
| # schema: | ||
| # openAPIV3Schema: | ||
| # description: |- | ||
| # VolumeGroupSnapshotClass specifies parameters that a underlying storage system | ||
| # uses when creating a volume group snapshot. A specific VolumeGroupSnapshotClass | ||
| # is used by specifying its name in a VolumeGroupSnapshot object. | ||
| # VolumeGroupSnapshotClasses are non-namespaced. | ||
| # properties: | ||
| # apiVersion: | ||
| # description: |- | ||
| # APIVersion defines the versioned schema of this representation of an object. | ||
| # Servers should convert recognized schemas to the latest internal value, and | ||
| # may reject unrecognized values. | ||
| # More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
| # type: string | ||
| # deletionPolicy: | ||
| # description: |- | ||
| # DeletionPolicy determines whether a VolumeGroupSnapshotContent created | ||
| # through the VolumeGroupSnapshotClass should be deleted when its bound | ||
| # VolumeGroupSnapshot is deleted. | ||
| # Supported values are "Retain" and "Delete". | ||
| # "Retain" means that the VolumeGroupSnapshotContent and its physical group | ||
| # snapshot on underlying storage system are kept. | ||
| # "Delete" means that the VolumeGroupSnapshotContent and its physical group | ||
| # snapshot on underlying storage system are deleted. | ||
| # Required. | ||
| # enum: | ||
| # - Delete | ||
| # - Retain | ||
| # type: string | ||
| # driver: | ||
| # description: |- | ||
| # Driver is the name of the storage driver expected to handle this VolumeGroupSnapshotClass. | ||
| # Required. | ||
| # type: string | ||
| # kind: | ||
| # description: |- | ||
| # Kind is a string value representing the REST resource this 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: | ||
| # type: object | ||
| # parameters: | ||
| # additionalProperties: | ||
| # type: string | ||
| # description: |- | ||
| # Parameters is a key-value map with storage driver specific parameters for | ||
| # creating group snapshots. | ||
| # These values are opaque to Kubernetes and are passed directly to the driver. | ||
| # type: object | ||
| # required: | ||
| # - deletionPolicy | ||
| # - driver | ||
| # type: object | ||
| # served: true | ||
| # storage: false | ||
| # subresources: {} | ||
| - additionalPrinterColumns: | ||
| - jsonPath: .driver | ||
| name: Driver | ||
| type: string | ||
| - description: Determines whether a VolumeGroupSnapshotContent created through | ||
| the VolumeGroupSnapshotClass should be deleted when its bound VolumeGroupSnapshot | ||
| is deleted. | ||
| jsonPath: .deletionPolicy | ||
| name: DeletionPolicy | ||
| type: string | ||
| - jsonPath: .metadata.creationTimestamp | ||
| name: Age | ||
| type: date | ||
| name: v1 | ||
| schema: | ||
| openAPIV3Schema: | ||
| description: |- | ||
| VolumeGroupSnapshotClass specifies parameters that a underlying storage system | ||
| uses when creating a volume group snapshot. A specific VolumeGroupSnapshotClass | ||
| is used by specifying its name in a VolumeGroupSnapshot object. | ||
| VolumeGroupSnapshotClasses are non-namespaced. | ||
| properties: | ||
| apiVersion: | ||
| description: |- | ||
| APIVersion defines the versioned schema of this representation of an object. | ||
| Servers should convert recognized schemas to the latest internal value, and | ||
| may reject unrecognized values. | ||
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
| type: string | ||
| deletionPolicy: | ||
| description: |- | ||
| DeletionPolicy determines whether a VolumeGroupSnapshotContent created | ||
| through the VolumeGroupSnapshotClass should be deleted when its bound | ||
| VolumeGroupSnapshot is deleted. | ||
| Supported values are "Retain" and "Delete". | ||
| "Retain" means that the VolumeGroupSnapshotContent and its physical group | ||
| snapshot on underlying storage system are kept. | ||
| "Delete" means that the VolumeGroupSnapshotContent and its physical group | ||
| snapshot on underlying storage system are deleted. | ||
| Required. | ||
| enum: | ||
| - Delete | ||
| - Retain | ||
| type: string | ||
| x-kubernetes-validations: | ||
| - message: deletionPolicy is immutable once set | ||
| rule: self == oldSelf | ||
| driver: | ||
| description: |- | ||
| Driver is the name of the storage driver expected to handle this VolumeGroupSnapshotClass. | ||
| Required. | ||
| type: string | ||
| x-kubernetes-validations: | ||
| - message: driver is immutable once set | ||
| rule: self == oldSelf | ||
| kind: | ||
| description: |- | ||
| Kind is a string value representing the REST resource this 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: | ||
| type: object | ||
| parameters: | ||
| additionalProperties: | ||
| type: string | ||
| description: |- | ||
| Parameters is a key-value map with storage driver specific parameters for | ||
| creating group snapshots. | ||
| These values are opaque to Kubernetes and are passed directly to the driver. | ||
| type: object | ||
| x-kubernetes-validations: | ||
| - message: parameters are immutable once set | ||
| rule: self == oldSelf | ||
| required: | ||
| - deletionPolicy | ||
| - driver | ||
| type: object | ||
| served: true | ||
| storage: true | ||
| subresources: {} | ||
| # Don't offer v1beta2 API in OCP, we don't want beta APIs there. | ||
| # - additionalPrinterColumns: | ||
| # - jsonPath: .driver | ||
| # name: Driver | ||
| # type: string | ||
| # - description: Determines whether a VolumeGroupSnapshotContent created through | ||
| # the VolumeGroupSnapshotClass should be deleted when its bound VolumeGroupSnapshot | ||
| # is deleted. | ||
| # jsonPath: .deletionPolicy | ||
| # name: DeletionPolicy | ||
| # type: string | ||
| # - jsonPath: .metadata.creationTimestamp | ||
| # name: Age | ||
| # type: date | ||
| # name: v1beta2 | ||
| # schema: | ||
| # openAPIV3Schema: | ||
| # description: |- | ||
| # VolumeGroupSnapshotClass specifies parameters that a underlying storage system | ||
| # uses when creating a volume group snapshot. A specific VolumeGroupSnapshotClass | ||
| # is used by specifying its name in a VolumeGroupSnapshot object. | ||
| # VolumeGroupSnapshotClasses are non-namespaced. | ||
| # properties: | ||
| # apiVersion: | ||
| # description: |- | ||
| # APIVersion defines the versioned schema of this representation of an object. | ||
| # Servers should convert recognized schemas to the latest internal value, and | ||
| # may reject unrecognized values. | ||
| # More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
| # type: string | ||
| # deletionPolicy: | ||
| # description: |- | ||
| # DeletionPolicy determines whether a VolumeGroupSnapshotContent created | ||
| # through the VolumeGroupSnapshotClass should be deleted when its bound | ||
| # VolumeGroupSnapshot is deleted. | ||
| # Supported values are "Retain" and "Delete". | ||
| # "Retain" means that the VolumeGroupSnapshotContent and its physical group | ||
| # snapshot on underlying storage system are kept. | ||
| # "Delete" means that the VolumeGroupSnapshotContent and its physical group | ||
| # snapshot on underlying storage system are deleted. | ||
| # Required. | ||
| # enum: | ||
| # - Delete | ||
| # - Retain | ||
| # type: string | ||
| # x-kubernetes-validations: | ||
| # - message: deletionPolicy is immutable once set | ||
| # rule: self == oldSelf | ||
| # driver: | ||
| # description: |- | ||
| # Driver is the name of the storage driver expected to handle this VolumeGroupSnapshotClass. | ||
| # Required. | ||
| # type: string | ||
| # x-kubernetes-validations: | ||
| # - message: driver is immutable once set | ||
| # rule: self == oldSelf | ||
| # kind: | ||
| # description: |- | ||
| # Kind is a string value representing the REST resource this 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: | ||
| # type: object | ||
| # parameters: | ||
| # additionalProperties: | ||
| # type: string | ||
| # description: |- | ||
| # Parameters is a key-value map with storage driver specific parameters for | ||
| # creating group snapshots. | ||
| # These values are opaque to Kubernetes and are passed directly to the driver. | ||
| # type: object | ||
| # x-kubernetes-validations: | ||
| # - message: parameters are immutable once set | ||
| # rule: self == oldSelf | ||
| # required: | ||
| # - deletionPolicy | ||
| # - driver | ||
| # type: object | ||
| # served: true | ||
| # storage: false | ||
| # subresources: {} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is now present in OpenShift's yaml files, see openshift/cluster-csi-snapshot-controller-operator#261
It's probably unnecessary in Microshift - the load won't be that high. On the other hand, it should not harm anything. I kept it to be in sync with OpenShift.