Skip to content

Commit 3fadf1a

Browse files
authored
Merge pull request #607 from appian/short-names-release-5.0
Add short names for Volume Snapshot CRDs
2 parents 8bb933b + eb7aa9b commit 3fadf1a

File tree

7 files changed

+20
-12
lines changed

7 files changed

+20
-12
lines changed

client/apis/volumesnapshot/v1/types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
// VolumeSnapshot is a user's request for either creating a point-in-time
3030
// snapshot of a persistent volume, or binding to a pre-existing snapshot.
3131
// +kubebuilder:object:root=true
32-
// +kubebuilder:resource:scope=Namespaced
32+
// +kubebuilder:resource:scope=Namespaced,shortName=vs
3333
// +kubebuilder:subresource:status
3434
// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if the snapshot is ready to be used to restore a volume."
3535
// +kubebuilder:printcolumn:name="SourcePVC",type=string,JSONPath=`.spec.source.persistentVolumeClaimName`,description="If a new snapshot needs to be created, this contains the name of the source PVC from which this snapshot was (or will be) created."
@@ -194,7 +194,7 @@ type VolumeSnapshotStatus struct {
194194
// name in a VolumeSnapshot object.
195195
// VolumeSnapshotClasses are non-namespaced
196196
// +kubebuilder:object:root=true
197-
// +kubebuilder:resource:scope=Cluster
197+
// +kubebuilder:resource:scope=Cluster,shortName=vsclass;vsclasses
198198
// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.driver`
199199
// +kubebuilder:printcolumn:name="DeletionPolicy",type=string,JSONPath=`.deletionPolicy`,description="Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted."
200200
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
@@ -245,7 +245,7 @@ type VolumeSnapshotClassList struct {
245245
// VolumeSnapshotContent represents the actual "on-disk" snapshot object in the
246246
// underlying storage system
247247
// +kubebuilder:object:root=true
248-
// +kubebuilder:resource:scope=Cluster
248+
// +kubebuilder:resource:scope=Cluster,shortName=vsc;vscs
249249
// +kubebuilder:subresource:status
250250
// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if the snapshot is ready to be used to restore a volume."
251251
// +kubebuilder:printcolumn:name="RestoreSize",type=integer,JSONPath=`.status.restoreSize`,description="Represents the complete size of the snapshot in bytes"

client/apis/volumesnapshot/v1beta1/types.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
// VolumeSnapshot is a user's request for either creating a point-in-time
3030
// snapshot of a persistent volume, or binding to a pre-existing snapshot.
3131
// +kubebuilder:object:root=true
32-
// +kubebuilder:resource:scope=Namespaced
32+
// +kubebuilder:resource:scope=Namespaced,shortName=vs
3333
// +kubebuilder:subresource:status
3434
// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if a snapshot is ready to be used to restore a volume."
3535
// +kubebuilder:printcolumn:name="SourcePVC",type=string,JSONPath=`.spec.source.persistentVolumeClaimName`,description="Name of the source PVC from where a dynamically taken snapshot will be created."
@@ -170,7 +170,7 @@ type VolumeSnapshotStatus struct {
170170
// name in a VolumeSnapshot object.
171171
// VolumeSnapshotClasses are non-namespaced
172172
// +kubebuilder:object:root=true
173-
// +kubebuilder:resource:scope=Cluster
173+
// +kubebuilder:resource:scope=Cluster,shortName=vsclass;vsclasses
174174
// +kubebuilder:printcolumn:name="Driver",type=string,JSONPath=`.driver`
175175
// +kubebuilder:printcolumn:name="DeletionPolicy",type=string,JSONPath=`.deletionPolicy`,description="Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted."
176176
// +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`
@@ -221,7 +221,7 @@ type VolumeSnapshotClassList struct {
221221
// VolumeSnapshotContent represents the actual "on-disk" snapshot object in the
222222
// underlying storage system
223223
// +kubebuilder:object:root=true
224-
// +kubebuilder:resource:scope=Cluster
224+
// +kubebuilder:resource:scope=Cluster,shortName=vsc;vscs
225225
// +kubebuilder:subresource:status
226226
// +kubebuilder:printcolumn:name="ReadyToUse",type=boolean,JSONPath=`.status.readyToUse`,description="Indicates if a snapshot is ready to be used to restore a volume."
227227
// +kubebuilder:printcolumn:name="RestoreSize",type=integer,JSONPath=`.status.restoreSize`,description="Represents the complete size of the snapshot in bytes"

client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ spec:
1414
kind: VolumeSnapshotClass
1515
listKind: VolumeSnapshotClassList
1616
plural: volumesnapshotclasses
17+
shortNames:
18+
- vsclass
19+
- vsclasses
1720
singular: volumesnapshotclass
1821
scope: Cluster
1922
versions:

client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ spec:
1414
kind: VolumeSnapshotContent
1515
listKind: VolumeSnapshotContentList
1616
plural: volumesnapshotcontents
17+
shortNames:
18+
- vsc
19+
- vscs
1720
singular: volumesnapshotcontent
1821
scope: Cluster
1922
versions:

client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ spec:
1414
kind: VolumeSnapshot
1515
listKind: VolumeSnapshotList
1616
plural: volumesnapshots
17+
shortNames:
18+
- vs
1719
singular: volumesnapshot
1820
scope: Namespaced
1921
versions:

vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1/types.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1beta1/types.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)