You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hack/README.md
+38-16Lines changed: 38 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,14 +10,14 @@ This is the script to update clientset/informers/listers and API deepcopy code u
10
10
11
11
Make sure to run this script after making changes to /client/apis/volumesnapshot/v1beta1/types.go.
12
12
13
-
To run this script, Run: ./hack/update-generated-code.sh from the project root directory.
13
+
Run: ./hack/update-generated-code.sh from the project root directory.
14
14
15
-
Once you run the script, you got the output as:
15
+
Once you run the script, you will get an output as follows:
16
16
```bash
17
17
Generating deepcopy funcs
18
-
Generating clientset for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/v2/clientset
19
-
Generating listers for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/v2/listers
20
-
Generating informers for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/v2/informers
18
+
Generating clientset for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/clientset
19
+
Generating listers for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/listers
20
+
Generating informers for volumesnapshot:v1beta1 at github.com/kubernetes-csi/external-snapshotter/client/informers
21
21
22
22
```
23
23
@@ -30,7 +30,7 @@ Make sure to run this script after making changes to /client/apis/volumesnapshot
30
30
31
31
Follow these steps to update the CRD:
32
32
33
-
* Run ./hack/update-crd.sh from client directory, new yaml files should have been created under ./config/crd/
33
+
* Run ../hack/update-crd.sh from client directory, new yaml files should have been created under ./config/crd/
34
34
35
35
* Add api-approved.kubernetes.io annotation value in all yaml files in the metadata section with the PR where the API is approved by the API reviewers. The current approved PR for snapshot beta API is https://github.com/kubernetes-csi/external-snapshotter/pull/139. Refer to https://github.com/kubernetes/enhancements/pull/1111 for details about this annotation.
36
36
@@ -43,17 +43,39 @@ For example, the following command will add a metadata section for a nested obje
43
43
```
44
44
* Update the restoreSize property to string in snapshot.storage.k8s.io_volumesnapshots.yaml
45
45
46
+
The generated yaml file contains restoreSize property anyOf as described below:
47
+
46
48
```bash
47
-
48
-
@@ -160,7 +157,7 @@ spec:
49
-
of a snapshot is unknown.
50
-
type: boolean
51
-
restoreSize:
52
-
- - type: string
53
-
+ type: string
54
-
description: restoreSize represents the complete size of the snapshot
55
-
in bytes. In dynamic snapshot creation case, this field will be filled
56
-
in with the "size_bytes" value returned from CSI "CreateSnapshotRequest"
49
+
restoreSize:
50
+
anyOf:
51
+
- type: integer
52
+
- type: string
53
+
description: restoreSize represents the complete size of the snapshot
54
+
in bytes. In dynamic snapshot creation case, this field will be filled
55
+
in with the "size_bytes" value returned from CSI "CreateSnapshotRequest"
56
+
gRPC call. For a pre-existing snapshot, this field will be filled
57
+
with the "size_bytes" value returned from the CSI "ListSnapshots"
58
+
gRPC call if the driver supports it. When restoring a volume from
59
+
this snapshot, the size of the volume MUST NOT be smaller than the
60
+
restoreSize if it is specified, otherwise the restoration will fail.
61
+
If not specified, it indicates that the size is unknown.
62
+
```
63
+
64
+
Update the restoreSize property to use type string only:
65
+
66
+
```bash
67
+
68
+
restoreSize:
69
+
type: string
70
+
description: restoreSize represents the complete size of the snapshot
71
+
in bytes. In dynamic snapshot creation case, this field will be filled
72
+
in with the "size_bytes" value returned from CSI "CreateSnapshotRequest"
73
+
gRPC call. For a pre-existing snapshot, this field will be filled
74
+
with the "size_bytes" value returned from the CSI "ListSnapshots"
75
+
gRPC call if the driver supports it. When restoring a volume from
76
+
this snapshot, the size of the volume MUST NOT be smaller than the
77
+
restoreSize if it is specified, otherwise the restoration will fail.
78
+
If not specified, it indicates that the size is unknown.
0 commit comments