Merge pull request #107834 from SataQiu/fix-applyconfiguration

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

Kubernetes-commit: 20a2a4c1af861be8581d63284a68d2dd9454b484
This commit is contained in:
Kubernetes Publisher
2022-02-08 09:59:14 -08:00
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