client-go: Scale() constructor for ScaleApplyConfiguration missing WithKind, WithAPIVersion #107795
Labels
kind/bug
Categorizes issue or PR as related to a bug.
sig/api-machinery
Categorizes an issue or PR as relevant to SIG API Machinery.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What happened?
Most of the FooApplyConfiguration constructors pre-fill the Kind and APIVersion fields to make using them smooth.
But k8s.io/client-go/applyconfigurations/autoscaling/v1.Scale() is missing this, making patterns like this fail:
Currently this code fails with (server-side) error
Incorrect version specified in apply patch. Specified patch version: , expected: autoscaling/v1
.What did you expect to happen?
The
Scale()
constructor should set the minimum required fields for the resulting object to be usable withApplyScale()
calls, similar to how e.g. the `DHow can we reproduce it (as minimally and precisely as possible)?
Anything else we need to know?
I can see that the presence or absence of these metadata fields is driven by some code generation, but I wasn't able to follow through to what configures that code generation. I assume it's something in the schemas somewhere, but that wasn't clear to me.
Kubernetes version
Cloud provider
OS version
N/A
Install tools
N/A
Container runtime (CRI) and and version (if applicable)
N/A
Related plugins (CNI, CSI, ...) and versions (if applicable)
N/A
The text was updated successfully, but these errors were encountered: