-
Notifications
You must be signed in to change notification settings - Fork 494
Controller gen #5543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Controller gen #5543
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/bin/bash | ||
| set -eux | ||
| # usage: bash ./hack/update-codegen-crd.sh | ||
|
|
||
| # set GOPROXY you like | ||
| export GOPROXY=https://goproxy.cn | ||
zbb88888 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # use controller-gen to generate CRDs | ||
| # ensure controller-gen is installed | ||
| CONTROLLER_TOOLS_VERSION=${CONTROLLER_TOOLS_VERSION:-"v0.17.3"} | ||
| go install sigs.k8s.io/controller-tools/cmd/controller-gen@"${CONTROLLER_TOOLS_VERSION}" | ||
| go mod tidy | ||
|
|
||
| # generate CRDs | ||
| controller-gen crd:allowDangerousTypes=true paths=./pkg/apis/kubeovn/v1 output:crd:artifacts:config=./yamls/crds | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -6,7 +6,7 @@ import ( | |||||
| ) | ||||||
|
|
||||||
| type BigInt struct { | ||||||
| big.Int | ||||||
| big.Int `json:"bigInt"` | ||||||
|
||||||
| big.Int `json:"bigInt"` | |
| big.Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root@debian:~/f/kube-ovn controller-gen ✔ 3m ⍉
▶ bash ./hack/update-codegen-crd.sh
- export GOPROXY=https://goproxy.cn
- GOPROXY=https://goproxy.cn
- CONTROLLER_TOOLS_VERSION=v0.17.3
- go install sigs.k8s.io/controller-tools/cmd/[email protected]
- go mod tidy
- controller-gen crd:allowDangerousTypes=true paths=./pkg/apis/kubeovn/v1 output:crd:artifacts:config=./yamls/crds
/root/f/kube-ovn/pkg/internal/big_int.go:9:2: encountered struct field "" without JSON tag in type "BigInt"
github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1:-: conflicting types in allOf branches in schema: object vs string
github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1:-: conflicting types in allOf branches in schema: object vs string
github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1:-: conflicting types in allOf branches in schema: object vs string
github.com/kubeovn/kube-ovn/pkg/apis/kubeovn/v1:-: conflicting types in allOf branches in schema: object vs string
Error: not all generators ran successfully
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ensure the script runs correctly regardless of the directory from which it is called, it's a good practice to change the directory to the project root at the beginning of the script. This makes the script more robust.