K8s: Fix hack/update-codegen (#91867)
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
|
||||
)
|
||||
|
||||
// ExternalNameApplyConfiguration represents an declarative configuration of the ExternalName type for use
|
||||
// ExternalNameApplyConfiguration represents a declarative configuration of the ExternalName type for use
|
||||
// with apply.
|
||||
type ExternalNameApplyConfiguration struct {
|
||||
v1.TypeMetaApplyConfiguration `json:",inline"`
|
||||
@@ -18,7 +18,7 @@ type ExternalNameApplyConfiguration struct {
|
||||
Spec *ExternalNameSpecApplyConfiguration `json:"spec,omitempty"`
|
||||
}
|
||||
|
||||
// ExternalName constructs an declarative configuration of the ExternalName type for use with
|
||||
// ExternalName constructs a declarative configuration of the ExternalName type for use with
|
||||
// apply.
|
||||
func ExternalName(name, namespace string) *ExternalNameApplyConfiguration {
|
||||
b := &ExternalNameApplyConfiguration{}
|
||||
@@ -194,3 +194,9 @@ func (b *ExternalNameApplyConfiguration) WithSpec(value *ExternalNameSpecApplyCo
|
||||
b.Spec = value
|
||||
return b
|
||||
}
|
||||
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *ExternalNameApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.Name
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
package v0alpha1
|
||||
|
||||
// ExternalNameSpecApplyConfiguration represents an declarative configuration of the ExternalNameSpec type for use
|
||||
// ExternalNameSpecApplyConfiguration represents a declarative configuration of the ExternalNameSpec type for use
|
||||
// with apply.
|
||||
type ExternalNameSpecApplyConfiguration struct {
|
||||
Host *string `json:"host,omitempty"`
|
||||
}
|
||||
|
||||
// ExternalNameSpecApplyConfiguration constructs an declarative configuration of the ExternalNameSpec type for use with
|
||||
// ExternalNameSpecApplyConfiguration constructs a declarative configuration of the ExternalNameSpec type for use with
|
||||
// apply.
|
||||
func ExternalNameSpec() *ExternalNameSpecApplyConfiguration {
|
||||
return &ExternalNameSpecApplyConfiguration{}
|
||||
|
||||
@@ -8,8 +8,11 @@ import (
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/apis/alerting_notifications/v0alpha1"
|
||||
servicev0alpha1 "github.com/grafana/grafana/pkg/apis/service/v0alpha1"
|
||||
alertingnotificationsv0alpha1 "github.com/grafana/grafana/pkg/generated/applyconfiguration/alerting_notifications/v0alpha1"
|
||||
internal "github.com/grafana/grafana/pkg/generated/applyconfiguration/internal"
|
||||
applyconfigurationservicev0alpha1 "github.com/grafana/grafana/pkg/generated/applyconfiguration/service/v0alpha1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
testing "k8s.io/client-go/testing"
|
||||
)
|
||||
|
||||
// ForKind returns an apply configuration type for the given GroupVersionKind, or nil if no
|
||||
@@ -41,3 +44,7 @@ func ForKind(kind schema.GroupVersionKind) interface{} {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func NewTypeConverter(scheme *runtime.Scheme) *testing.TypeConverter {
|
||||
return &testing.TypeConverter{Scheme: scheme, TypeResolver: internal.Parser()}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user