Skip to content

Commit cd71708

Browse files
committed
ci: add volumesnapshotclass crd
- to make lint happy for lvm volumesnapshotclass.yaml - bump kind-action to v1.10.0 Signed-off-by: Vicente Cheng <[email protected]>
1 parent 007e52f commit cd71708

File tree

2 files changed

+148
-1
lines changed

2 files changed

+148
-1
lines changed

.github/workflows/ci.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,17 @@ jobs:
5353
fi
5454
5555
- name: Create kind cluster
56-
uses: helm/kind-action@v1.2.0
56+
uses: helm/kind-action@v1.10.0
5757
if: steps.list-changed.outputs.changed == 'true'
5858

5959
- name: Create harvester-system namespace
6060
run: "kubectl create namespace harvester-system"
6161
if: steps.list-changed.outputs.changed == 'true'
6262

63+
- name: Create Snapshotter volumesnapshotclass crd
64+
run: "kubectl create -f tests/snapshotter_volumesnapshotclass.yaml"
65+
if: steps.list-changed.outputs.changed == 'true'
66+
6367
- name: Run chart-testing (install)
6468
run: ct install --config tests/ct.yaml
6569

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
apiVersion: apiextensions.k8s.io/v1
3+
kind: CustomResourceDefinition
4+
metadata:
5+
annotations:
6+
api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/814"
7+
controller-gen.kubebuilder.io/version: v0.15.0
8+
name: volumesnapshotclasses.snapshot.storage.k8s.io
9+
spec:
10+
group: snapshot.storage.k8s.io
11+
names:
12+
kind: VolumeSnapshotClass
13+
listKind: VolumeSnapshotClassList
14+
plural: volumesnapshotclasses
15+
shortNames:
16+
- vsclass
17+
- vsclasses
18+
singular: volumesnapshotclass
19+
scope: Cluster
20+
versions:
21+
- additionalPrinterColumns:
22+
- jsonPath: .driver
23+
name: Driver
24+
type: string
25+
- description: Determines whether a VolumeSnapshotContent created through the
26+
VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted.
27+
jsonPath: .deletionPolicy
28+
name: DeletionPolicy
29+
type: string
30+
- jsonPath: .metadata.creationTimestamp
31+
name: Age
32+
type: date
33+
name: v1
34+
schema:
35+
openAPIV3Schema:
36+
description: |-
37+
VolumeSnapshotClass specifies parameters that a underlying storage system uses when
38+
creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its
39+
name in a VolumeSnapshot object.
40+
VolumeSnapshotClasses are non-namespaced
41+
properties:
42+
apiVersion:
43+
description: |-
44+
APIVersion defines the versioned schema of this representation of an object.
45+
Servers should convert recognized schemas to the latest internal value, and
46+
may reject unrecognized values.
47+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
48+
type: string
49+
deletionPolicy:
50+
description: |-
51+
deletionPolicy determines whether a VolumeSnapshotContent created through
52+
the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted.
53+
Supported values are "Retain" and "Delete".
54+
"Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept.
55+
"Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted.
56+
Required.
57+
enum:
58+
- Delete
59+
- Retain
60+
type: string
61+
driver:
62+
description: |-
63+
driver is the name of the storage driver that handles this VolumeSnapshotClass.
64+
Required.
65+
type: string
66+
kind:
67+
description: |-
68+
Kind is a string value representing the REST resource this object represents.
69+
Servers may infer this from the endpoint the client submits requests to.
70+
Cannot be updated.
71+
In CamelCase.
72+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
73+
type: string
74+
metadata:
75+
type: object
76+
parameters:
77+
additionalProperties:
78+
type: string
79+
description: |-
80+
parameters is a key-value map with storage driver specific parameters for creating snapshots.
81+
These values are opaque to Kubernetes.
82+
type: object
83+
required:
84+
- deletionPolicy
85+
- driver
86+
type: object
87+
served: true
88+
storage: true
89+
subresources: {}
90+
- additionalPrinterColumns:
91+
- jsonPath: .driver
92+
name: Driver
93+
type: string
94+
- description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted.
95+
jsonPath: .deletionPolicy
96+
name: DeletionPolicy
97+
type: string
98+
- jsonPath: .metadata.creationTimestamp
99+
name: Age
100+
type: date
101+
name: v1beta1
102+
# This indicates the v1beta1 version of the custom resource is deprecated.
103+
# API requests to this version receive a warning in the server response.
104+
deprecated: true
105+
# This overrides the default warning returned to clients making v1beta1 API requests.
106+
deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotClass is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotClass"
107+
schema:
108+
openAPIV3Schema:
109+
description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced
110+
properties:
111+
apiVersion:
112+
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'
113+
type: string
114+
deletionPolicy:
115+
description: deletionPolicy determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. Required.
116+
enum:
117+
- Delete
118+
- Retain
119+
type: string
120+
driver:
121+
description: driver is the name of the storage driver that handles this VolumeSnapshotClass. Required.
122+
type: string
123+
kind:
124+
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'
125+
type: string
126+
parameters:
127+
additionalProperties:
128+
type: string
129+
description: parameters is a key-value map with storage driver specific parameters for creating snapshots. These values are opaque to Kubernetes.
130+
type: object
131+
required:
132+
- deletionPolicy
133+
- driver
134+
type: object
135+
served: false
136+
storage: false
137+
subresources: {}
138+
status:
139+
acceptedNames:
140+
kind: ""
141+
plural: ""
142+
conditions: []
143+
storedVersions: []

0 commit comments

Comments
 (0)