K8s: Add k8s codegen PR check (#91903)

This commit is contained in:
Todd Treece
2024-08-14 11:06:37 -04:00
committed by GitHub
parent 44290ddf32
commit da6b02a2b0
27 changed files with 363 additions and 456 deletions
@@ -5,20 +5,20 @@
package v0alpha1
import (
json "encoding/json"
v0alpha1 "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
)
// IntegrationApplyConfiguration represents an declarative configuration of the Integration type for use
// IntegrationApplyConfiguration represents a declarative configuration of the Integration type for use
// with apply.
type IntegrationApplyConfiguration struct {
DisableResolveMessage *bool `json:"disableResolveMessage,omitempty"`
SecureFields map[string]bool `json:"SecureFields,omitempty"`
Settings *json.RawMessage `json:"settings,omitempty"`
Type *string `json:"type,omitempty"`
Uid *string `json:"uid,omitempty"`
DisableResolveMessage *bool `json:"disableResolveMessage,omitempty"`
SecureFields map[string]bool `json:"secureFields,omitempty"`
Settings *v0alpha1.Unstructured `json:"settings,omitempty"`
Type *string `json:"type,omitempty"`
Uid *string `json:"uid,omitempty"`
}
// IntegrationApplyConfiguration constructs an declarative configuration of the Integration type for use with
// IntegrationApplyConfiguration constructs a declarative configuration of the Integration type for use with
// apply.
func Integration() *IntegrationApplyConfiguration {
return &IntegrationApplyConfiguration{}
@@ -49,7 +49,7 @@ func (b *IntegrationApplyConfiguration) WithSecureFields(entries map[string]bool
// WithSettings sets the Settings field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Settings field is set to the value of the last call.
func (b *IntegrationApplyConfiguration) WithSettings(value json.RawMessage) *IntegrationApplyConfiguration {
func (b *IntegrationApplyConfiguration) WithSettings(value v0alpha1.Unstructured) *IntegrationApplyConfiguration {
b.Settings = &value
return b
}
@@ -4,7 +4,7 @@
package v0alpha1
// IntervalApplyConfiguration represents an declarative configuration of the Interval type for use
// IntervalApplyConfiguration represents a declarative configuration of the Interval type for use
// with apply.
type IntervalApplyConfiguration struct {
DaysOfMonth []string `json:"days_of_month,omitempty"`
@@ -15,7 +15,7 @@ type IntervalApplyConfiguration struct {
Years []string `json:"years,omitempty"`
}
// IntervalApplyConfiguration constructs an declarative configuration of the Interval type for use with
// IntervalApplyConfiguration constructs a declarative configuration of the Interval type for use with
// apply.
func Interval() *IntervalApplyConfiguration {
return &IntervalApplyConfiguration{}
@@ -10,7 +10,7 @@ import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// ReceiverApplyConfiguration represents an declarative configuration of the Receiver type for use
// ReceiverApplyConfiguration represents a declarative configuration of the Receiver type for use
// with apply.
type ReceiverApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -18,7 +18,7 @@ type ReceiverApplyConfiguration struct {
Spec *ReceiverSpecApplyConfiguration `json:"spec,omitempty"`
}
// Receiver constructs an declarative configuration of the Receiver type for use with
// Receiver constructs a declarative configuration of the Receiver type for use with
// apply.
func Receiver(name, namespace string) *ReceiverApplyConfiguration {
b := &ReceiverApplyConfiguration{}
@@ -194,3 +194,9 @@ func (b *ReceiverApplyConfiguration) WithSpec(value *ReceiverSpecApplyConfigurat
b.Spec = value
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *ReceiverApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.Name
}
@@ -4,14 +4,14 @@
package v0alpha1
// ReceiverSpecApplyConfiguration represents an declarative configuration of the ReceiverSpec type for use
// ReceiverSpecApplyConfiguration represents a declarative configuration of the ReceiverSpec type for use
// with apply.
type ReceiverSpecApplyConfiguration struct {
Integrations []IntegrationApplyConfiguration `json:"integrations,omitempty"`
Title *string `json:"title,omitempty"`
}
// ReceiverSpecApplyConfiguration constructs an declarative configuration of the ReceiverSpec type for use with
// ReceiverSpecApplyConfiguration constructs a declarative configuration of the ReceiverSpec type for use with
// apply.
func ReceiverSpec() *ReceiverSpecApplyConfiguration {
return &ReceiverSpecApplyConfiguration{}
@@ -10,7 +10,7 @@ import (
v1 "k8s.io/client-go/applyconfigurations/meta/v1"
)
// TimeIntervalApplyConfiguration represents an declarative configuration of the TimeInterval type for use
// TimeIntervalApplyConfiguration represents a declarative configuration of the TimeInterval type for use
// with apply.
type TimeIntervalApplyConfiguration struct {
v1.TypeMetaApplyConfiguration `json:",inline"`
@@ -18,7 +18,7 @@ type TimeIntervalApplyConfiguration struct {
Spec *TimeIntervalSpecApplyConfiguration `json:"spec,omitempty"`
}
// TimeInterval constructs an declarative configuration of the TimeInterval type for use with
// TimeInterval constructs a declarative configuration of the TimeInterval type for use with
// apply.
func TimeInterval(name, namespace string) *TimeIntervalApplyConfiguration {
b := &TimeIntervalApplyConfiguration{}
@@ -194,3 +194,9 @@ func (b *TimeIntervalApplyConfiguration) WithSpec(value *TimeIntervalSpecApplyCo
b.Spec = value
return b
}
// GetName retrieves the value of the Name field in the declarative configuration.
func (b *TimeIntervalApplyConfiguration) GetName() *string {
b.ensureObjectMetaApplyConfigurationExists()
return b.Name
}
@@ -4,14 +4,14 @@
package v0alpha1
// TimeIntervalSpecApplyConfiguration represents an declarative configuration of the TimeIntervalSpec type for use
// TimeIntervalSpecApplyConfiguration represents a declarative configuration of the TimeIntervalSpec type for use
// with apply.
type TimeIntervalSpecApplyConfiguration struct {
Name *string `json:"name,omitempty"`
TimeIntervals []IntervalApplyConfiguration `json:"time_intervals,omitempty"`
}
// TimeIntervalSpecApplyConfiguration constructs an declarative configuration of the TimeIntervalSpec type for use with
// TimeIntervalSpecApplyConfiguration constructs a declarative configuration of the TimeIntervalSpec type for use with
// apply.
func TimeIntervalSpec() *TimeIntervalSpecApplyConfiguration {
return &TimeIntervalSpecApplyConfiguration{}
@@ -4,14 +4,14 @@
package v0alpha1
// TimeRangeApplyConfiguration represents an declarative configuration of the TimeRange type for use
// TimeRangeApplyConfiguration represents a declarative configuration of the TimeRange type for use
// with apply.
type TimeRangeApplyConfiguration struct {
EndTime *string `json:"end_time,omitempty"`
StartTime *string `json:"start_time,omitempty"`
}
// TimeRangeApplyConfiguration constructs an declarative configuration of the TimeRange type for use with
// TimeRangeApplyConfiguration constructs a declarative configuration of the TimeRange type for use with
// apply.
func TimeRange() *TimeRangeApplyConfiguration {
return &TimeRangeApplyConfiguration{}