Skip to content

Commit 7308dc4

Browse files
committed
doc: update crd generation to keep metadata
1 parent 8ac2e79 commit 7308dc4

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

client/hack/README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,6 @@ Follow these steps to update the CRD:
6666

6767
* 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 v1 API is https://github.com/kubernetes-csi/external-snapshotter/pull/419. Refer to https://github.com/kubernetes/enhancements/pull/1111 for details about this annotation.
6868

69-
* Remove any metadata sections from the yaml file which does not belong to the generated type.
70-
For example, the following command will add a metadata section for a nested object, remove any newly added metadata sections. TODO(xiangqian): this is to make sure the generated CRD is compatible with apiextensions.k8s.io/v1. Once controller-gen supports generating CRD with apiextensions.k8s.io/v1, switch to use the correct version of controller-gen and remove the last step from this README.
71-
72-
```bash
73-
./hack/update-crd.sh; git diff
74-
+ metadata:
75-
+ description: 'Standard object''s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata'
76-
type: object
77-
```
78-
7969
* Update the restoreSize property to string in snapshot.storage.k8s.io_volumesnapshots.yaml
8070

8171
The generated yaml file contains restoreSize property anyOf as described below:
@@ -180,4 +170,4 @@ Update the restoreSize property to use type string only:
180170
- required: ["persistentVolumeNames"]
181171
- required: ["volumeGroupSnapshotHandle"]
182172
volumeGroupSnapshotClassName:
183-
```
173+
```

0 commit comments

Comments
 (0)