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

Generators for kube-like API types

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

For the following struct: ```go type Foo struct { Bar []*string `json:"bar,omitempty"` } ``` applyconfiguration-gen generate the following "With" function: ```go func (b *Foo ) WithBar(values ...*string) *Bar{ for i...

lifecycle/rotten

If you use a fake client to `Get()` an object that doesn't exist, it returns `nil` and an error: ``` func (c *FakeEndpoints) Get(ctx context.Context, name string, options metav1.GetOptions) (result...

_This issue was filed based on [this discussion](https://kubernetes.slack.com/archives/CAR30FCJZ/p1714485687824459) in the [#kubebuilder](https://kubernetes.slack.com/archives/CAR30FCJZ) channel from Kubernetes Slack._ :wave: I encountered an oddity with controller-gen where I have two types, `Fu`, from two...

I think register-gen is helpful and useful. It should be included in kube_codegen.sh. If nothing else, I would like to help add it if possible.

lifecycle/stale

This has tested with 0.29.4, 0.30.0, and the current master branch. applyconfiguration-gen generates (experimental!) ExtractXYZ() and ExtractXYZStatus() functions that take an object and deliver an applyconfiguration that only has those...

Currently using [v0.30.5] of [code-generator] of conversion-gen. I have two apis v1alpha1 and v1alpha2. I have added // +k8s:conversion-gen=true marker to v1alpha2 api which is storage version I had updated...

We use `client-gen` like this: ``` client-gen \ --input-base "github.com//pkg/apis" \ --input "dedicated/v1alpha1" \ --output-pkg github.com//pkg/clientset \ --go-header-file hack/header.txt \ --clientset-name versioned \ --output-dir ./pkg/clientset ``` Works fine in 1.22.0...

We have noticed the client-gen failed to run sometimes in GitHub Action. After the investigation in https://github.com/mosn/htnn/pull/687, we found that the GOROOT mismatching causes it. The client-gen imports gengo, and...

1. k/k hack/lib/init.sh has `KUBE_AVAILABLE_GROUP_VERSIONS` which is a hand-maintained list of API groups 2. k/k pkg/api/testing/defaulting_test.go has `typesWithDefaulting` which is a hand-maintained list of GVKs with defaulters 3. k/k pkg/controlplane/instance.go...

lifecycle/frozen

## Description When using `register-gen` from the `code-generator` package to automatically generate the `zz_generated.register.go` file, the generated file is missing the import statements for the following packages: - `k8s.io/apimachinery/pkg/runtime` -...

lifecycle/rotten