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
this way, it can be a lot simpler with a single deployment resource to apply.
would like kubebuilder to scaffold to generate such go file, and glue by main.go
say a file sit aside with types.go, maybe name: ${types}_crd_generated.go
The text was updated successfully, but these errors were encountered:
this is just a example, I'd wish controller-gen can generated crd glue code in Go( so I can create crd when main.go started), rather than a bunch of yamls files.
You could embed the yaml file into the binary using a Go embedded FS, and marshal that into a CRD concrete type in your main.go, without any modification of how controller-tools works today
CRD in Go code
I'd like to have crd write in go, and create crd when main.go runs, similar to this approach: https://github1s.com/k3s-io/helm-controller/blob/master/pkg/crd/crds.go
https://github1s.com/k3s-io/helm-controller/blob/master/main.go#L60-L61
https://pkg.go.dev/github.com/rancher/wrangler/v3/pkg/crd
https://github.com/rancher/wrangler/blob/v3.1.0/pkg/crd/print.go#L57-L64
The text was updated successfully, but these errors were encountered: