code-generator: fix the bug that ApplyConfiguration constructor missing WithKind/WithAPIVersion methods

Kubernetes-commit: ce50eed94122b780c8e438c3cb30a76fd2012464
This commit is contained in:
SataQiu 2022-01-28 17:01:32 +08:00 committed by Kubernetes Publisher
parent 4c892f8a5d
commit 1f90b31573
4 changed files with 16 additions and 4 deletions

View File

@ -37,7 +37,10 @@ type ScaleApplyConfiguration struct {
// ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with
// apply.
func Scale() *ScaleApplyConfiguration {
return &ScaleApplyConfiguration{}
b := &ScaleApplyConfiguration{}
b.WithKind("Scale")
b.WithAPIVersion("apps/v1beta2")
return b
}
// WithKind sets the Kind field in the declarative configuration to the given value

View File

@ -36,7 +36,10 @@ type ScaleApplyConfiguration struct {
// ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with
// apply.
func Scale() *ScaleApplyConfiguration {
return &ScaleApplyConfiguration{}
b := &ScaleApplyConfiguration{}
b.WithKind("Scale")
b.WithAPIVersion("autoscaling/v1")
return b
}
// WithKind sets the Kind field in the declarative configuration to the given value

View File

@ -37,7 +37,10 @@ type ScaleApplyConfiguration struct {
// ScaleApplyConfiguration constructs an declarative configuration of the Scale type for use with
// apply.
func Scale() *ScaleApplyConfiguration {
return &ScaleApplyConfiguration{}
b := &ScaleApplyConfiguration{}
b.WithKind("Scale")
b.WithAPIVersion("extensions/v1beta1")
return b
}
// WithKind sets the Kind field in the declarative configuration to the given value

View File

@ -36,7 +36,10 @@ type DeleteOptionsApplyConfiguration struct {
// DeleteOptionsApplyConfiguration constructs an declarative configuration of the DeleteOptions type for use with
// apply.
func DeleteOptions() *DeleteOptionsApplyConfiguration {
return &DeleteOptionsApplyConfiguration{}
b := &DeleteOptionsApplyConfiguration{}
b.WithKind("DeleteOptions")
b.WithAPIVersion("meta.k8s.io/v1")
return b
}
// WithKind sets the Kind field in the declarative configuration to the given value