1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-05 15:37:19 +00:00

docs: add section for generating helm docs and crds (#4507)

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>

Signed-off-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
This commit is contained in:
Charles-Edouard Brétéché 2022-09-05 17:08:07 +02:00 committed by GitHub
parent a86a76848f
commit dca4f83580
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,8 +25,8 @@ It contains instructions to build, run, and test Kyverno.
- [Generating API deep copy functions](#generating-api-deep-copy-functions)
- [Generating CRD definitions](#generating-crd-definitions)
- [Generating API docs](#generating-api-docs)
<!-- - [Generating helm charts CRDs]
- [Generating helm charts docs] -->
- [Generating helm charts CRDs](#generating-helm-charts-crds)
- [Generating helm charts docs](#generating-helm-charts-docs)
## Tools
@ -475,6 +475,36 @@ make codegen-api-docs
This will output API docs in [/docs/crd](./docs/crd).
### Generating helm charts CRDs
Based on the [APIs golang code definitions](./api), you can generate the corresponding CRD definitions for helm charts by running:
```console
# generate helm CRDs
make codegen-helm-crds
```
This will output CRDs templates in [/charts/kyverno/templates/crds.yaml](./charts/kyverno/templates/crds.yaml).
> **Note**: You can run `make codegen-helm-all` to generate CRDs and docs at once.
### Generating helm charts docs
Based on the helm charts default values:
- [kyverno](./charts/kyverno/values.yaml)
- [kyverno-policies](./charts/kyverno-policies/values.yaml)
You can generate the corresponding helm chart docs by running:
```console
# generate helm docs
make codegen-helm-docs
```
This will output docs in helm charts respective `README.md`:
- [kyverno](./charts/kyverno/README.md)
- [kyverno-policies](./charts/kyverno-policies/README.md)
> **Note**: You can run `make codegen-helm-all` to generate CRDs and docs at once.
## Building and publishing an image locally
First, make sure you [install `ko`](https://github.com/google/ko#install)