code-generator
code-generator copied to clipboard
Generators for kube-like API types
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...
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.
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...