From 1f90b31573706290f9ab217326b4828bb8ca300b Mon Sep 17 00:00:00 2001 From: SataQiu Date: Fri, 28 Jan 2022 17:01:32 +0800 Subject: [PATCH] code-generator: fix the bug that ApplyConfiguration constructor missing WithKind/WithAPIVersion methods Kubernetes-commit: ce50eed94122b780c8e438c3cb30a76fd2012464 --- applyconfigurations/apps/v1beta2/scale.go | 5 ++++- applyconfigurations/autoscaling/v1/scale.go | 5 ++++- applyconfigurations/extensions/v1beta1/scale.go | 5 ++++- applyconfigurations/meta/v1/deleteoptions.go | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/applyconfigurations/apps/v1beta2/scale.go b/applyconfigurations/apps/v1beta2/scale.go index d4901edf..9b98fbb8 100644 --- a/applyconfigurations/apps/v1beta2/scale.go +++ b/applyconfigurations/apps/v1beta2/scale.go @@ -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 diff --git a/applyconfigurations/autoscaling/v1/scale.go b/applyconfigurations/autoscaling/v1/scale.go index 2d2cfeb9..27862e9c 100644 --- a/applyconfigurations/autoscaling/v1/scale.go +++ b/applyconfigurations/autoscaling/v1/scale.go @@ -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 diff --git a/applyconfigurations/extensions/v1beta1/scale.go b/applyconfigurations/extensions/v1beta1/scale.go index 70114582..1f774e63 100644 --- a/applyconfigurations/extensions/v1beta1/scale.go +++ b/applyconfigurations/extensions/v1beta1/scale.go @@ -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 diff --git a/applyconfigurations/meta/v1/deleteoptions.go b/applyconfigurations/meta/v1/deleteoptions.go index 289bef43..7a1d2311 100644 --- a/applyconfigurations/meta/v1/deleteoptions.go +++ b/applyconfigurations/meta/v1/deleteoptions.go @@ -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