code-generator icon indicating copy to clipboard operation
code-generator copied to clipboard

Generators for kube-like API types

Results 25 code-generator issues
Sort by recently updated
recently updated
newest added

When you create a CRD, it can have a schema defined using json-schema. In github.com/kubernetes/sample-controller the client libraries for a controller are generated from a go API definition, and CRDs...

lifecycle/frozen

We would like to use struct types generated by protoc as .Spec field in CRD. The problem is that protobuf messages are not copyable while `applyconfiguration-gen` generates code that implies...

Running `k8s.io/code-generator/cmd/applyconfiguration-gen` on types that contains a map to a structure fail with a templating error. (Maps to native type work fine.) Best shown on a simple reproducer: ```golang type...

kind/bug

bash generate-groups.sh informer ./pkg huachaoGoTest/api/ "samplecontroller.k8s:v1" --go-header-file=./boilerplate.go.txt -v 5 --output-base ./ 2>&1

## Background At Knative project, we would like to get rid of the `vendor` directory (see knative/infra#134 for details). One of the things that block that is the extensive use...

Hi, When i am running generate-groups.sh to generate code, i got a error message. The error message is as follows: ./generate-groups.sh all github.com/bhl/custom-controller/resource/pkg/client github.com/bhl/custom-controller-resource/pkg/apis samplecrd:v1 --go-header-file ./hack/boilerplate.go.txt Generating deepcopy funcs...

lifecycle/rotten

Last year we [added a `v4` project layout in Kubebuilder](https://github.com/kubernetes-sigs/kubebuilder/pull/2985) which utilizes `api/` as the directory for APIs [to better follow the package naming standards](https://github.com/kubernetes-sigs/kubebuilder/issues/932#issuecomment-1368208867). I have some kubebuilder-based projects...

Using sample-controller as a reproducer, add `--with-apply-config` to https://github.com/kubernetes/sample-controller/blob/f53405abe7423d4addcbf2c4495604f02d6ef85f/hack/update-codegen.sh#L32-L36 Then changing groupName, for example to `samplecontroller2.k8s.io`, and running update-codegen will result in the following import from `pkg/generated/applyconfiguration/samplecontroller/v1alpha1/foo.go` ``` import (...

1. add `// +genclient:method=ApplyScale,verb=apply,subresource=scale,input=k8s.io/api/autoscaling/v1.Scale,result=k8s.io/api/autoscaling/v1.Scale` for the type 2. generate code with `client` and `applyconfiguration` The generated _clientset_ code imports a package like `../client/applyconfiguration/autoscaling/v1`, but `applyconfiguration` doesn't generate the `../client/applyconfiguration/autoscaling/v1` package

lifecycle/rotten

So when using the Operator-SDK it generates a go file like groupversion_info.go in your main API package. This defines stuff like: ```go // Package v1alpha1 contains API Schema definitions for...