https://github.com/tapojit047/crd
Code Generation for CustomResources
https://github.com/tapojit047/crd
client-go crd golang kubernetes
Last synced: about 1 month ago
JSON representation
Code Generation for CustomResources
- Host: GitHub
- URL: https://github.com/tapojit047/crd
- Owner: tapojit047
- Created: 2023-01-26T06:27:48.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T10:08:08.000Z (over 3 years ago)
- Last Synced: 2023-07-28T18:09:30.070Z (almost 3 years ago)
- Topics: client-go, crd, golang, kubernetes
- Language: Go
- Homepage:
- Size: 5.15 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CRD (Custom Resource Definitions)
- Generated Code using `k8s.io/code-generator`
## Steps of generating code:
- Created `types.go` defining the struct for CRD
- Create 'register.go' to register the custom resource
- Don't forget to implicitly add ``code-generator``. For that add this line in the ``import`` section of ``main.go``
- Then run `./hack/update-codegen.sh`.
- Oh! To solve the issue run this ``chmod u+x vendor/k8s.io/code-generator/generate-groups.sh`` and then run ``update-codegen.sh``