K8s: Update from v0.31.3 to v0.32.0 (#98507)
This commit is contained in:
+20
-20
@@ -33,7 +33,7 @@ func DataPlaneService(name string) *DataPlaneServiceApplyConfiguration {
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Kind field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithKind(value string) *DataPlaneServiceApplyConfiguration {
|
||||
b.Kind = &value
|
||||
b.TypeMetaApplyConfiguration.Kind = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithKind(value string) *DataPlaneSe
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the APIVersion field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithAPIVersion(value string) *DataPlaneServiceApplyConfiguration {
|
||||
b.APIVersion = &value
|
||||
b.TypeMetaApplyConfiguration.APIVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithAPIVersion(value string) *DataP
|
||||
// If called multiple times, the Name field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithName(value string) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Name = &value
|
||||
b.ObjectMetaApplyConfiguration.Name = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithName(value string) *DataPlaneSe
|
||||
// If called multiple times, the GenerateName field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithGenerateName(value string) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.GenerateName = &value
|
||||
b.ObjectMetaApplyConfiguration.GenerateName = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithGenerateName(value string) *Dat
|
||||
// If called multiple times, the Namespace field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithNamespace(value string) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Namespace = &value
|
||||
b.ObjectMetaApplyConfiguration.Namespace = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithNamespace(value string) *DataPl
|
||||
// If called multiple times, the UID field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithUID(value types.UID) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.UID = &value
|
||||
b.ObjectMetaApplyConfiguration.UID = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithUID(value types.UID) *DataPlane
|
||||
// If called multiple times, the ResourceVersion field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithResourceVersion(value string) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.ResourceVersion = &value
|
||||
b.ObjectMetaApplyConfiguration.ResourceVersion = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithResourceVersion(value string) *
|
||||
// If called multiple times, the Generation field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithGeneration(value int64) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.Generation = &value
|
||||
b.ObjectMetaApplyConfiguration.Generation = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithGeneration(value int64) *DataPl
|
||||
// If called multiple times, the CreationTimestamp field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithCreationTimestamp(value metav1.Time) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.CreationTimestamp = &value
|
||||
b.ObjectMetaApplyConfiguration.CreationTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithCreationTimestamp(value metav1.
|
||||
// If called multiple times, the DeletionTimestamp field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionTimestamp = &value
|
||||
b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithDeletionTimestamp(value metav1.
|
||||
// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
b.DeletionGracePeriodSeconds = &value
|
||||
b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -132,11 +132,11 @@ func (b *DataPlaneServiceApplyConfiguration) WithDeletionGracePeriodSeconds(valu
|
||||
// overwriting an existing map entries in Labels field with the same key.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithLabels(entries map[string]string) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Labels == nil && len(entries) > 0 {
|
||||
b.Labels = make(map[string]string, len(entries))
|
||||
if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Labels[k] = v
|
||||
b.ObjectMetaApplyConfiguration.Labels[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -147,11 +147,11 @@ func (b *DataPlaneServiceApplyConfiguration) WithLabels(entries map[string]strin
|
||||
// overwriting an existing map entries in Annotations field with the same key.
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithAnnotations(entries map[string]string) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
if b.Annotations == nil && len(entries) > 0 {
|
||||
b.Annotations = make(map[string]string, len(entries))
|
||||
if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 {
|
||||
b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries))
|
||||
}
|
||||
for k, v := range entries {
|
||||
b.Annotations[k] = v
|
||||
b.ObjectMetaApplyConfiguration.Annotations[k] = v
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -165,7 +165,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithOwnerReferences(values ...*v1.O
|
||||
if values[i] == nil {
|
||||
panic("nil value passed to WithOwnerReferences")
|
||||
}
|
||||
b.OwnerReferences = append(b.OwnerReferences, *values[i])
|
||||
b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -176,7 +176,7 @@ func (b *DataPlaneServiceApplyConfiguration) WithOwnerReferences(values ...*v1.O
|
||||
func (b *DataPlaneServiceApplyConfiguration) WithFinalizers(values ...string) *DataPlaneServiceApplyConfiguration {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
for i := range values {
|
||||
b.Finalizers = append(b.Finalizers, values[i])
|
||||
b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i])
|
||||
}
|
||||
return b
|
||||
}
|
||||
@@ -206,5 +206,5 @@ func (b *DataPlaneServiceApplyConfiguration) WithStatus(value *DataPlaneServiceS
|
||||
// GetName retrieves the value of the Name field in the declarative configuration.
|
||||
func (b *DataPlaneServiceApplyConfiguration) GetName() *string {
|
||||
b.ensureObjectMetaApplyConfigurationExists()
|
||||
return b.Name
|
||||
return b.ObjectMetaApplyConfiguration.Name
|
||||
}
|
||||
|
||||
+8
-8
@@ -5,18 +5,18 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
)
|
||||
|
||||
// DataPlaneServiceConditionApplyConfiguration represents a declarative configuration of the DataPlaneServiceCondition type for use
|
||||
// with apply.
|
||||
type DataPlaneServiceConditionApplyConfiguration struct {
|
||||
Type *v0alpha1.DataPlaneServiceConditionType `json:"type,omitempty"`
|
||||
Status *v0alpha1.ConditionStatus `json:"status,omitempty"`
|
||||
LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"`
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
Type *aggregationv0alpha1.DataPlaneServiceConditionType `json:"type,omitempty"`
|
||||
Status *aggregationv0alpha1.ConditionStatus `json:"status,omitempty"`
|
||||
LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"`
|
||||
Reason *string `json:"reason,omitempty"`
|
||||
Message *string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// DataPlaneServiceConditionApplyConfiguration constructs a declarative configuration of the DataPlaneServiceCondition type for use with
|
||||
@@ -28,7 +28,7 @@ func DataPlaneServiceCondition() *DataPlaneServiceConditionApplyConfiguration {
|
||||
// WithType sets the Type 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 Type field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceConditionApplyConfiguration) WithType(value v0alpha1.DataPlaneServiceConditionType) *DataPlaneServiceConditionApplyConfiguration {
|
||||
func (b *DataPlaneServiceConditionApplyConfiguration) WithType(value aggregationv0alpha1.DataPlaneServiceConditionType) *DataPlaneServiceConditionApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
@@ -36,7 +36,7 @@ func (b *DataPlaneServiceConditionApplyConfiguration) WithType(value v0alpha1.Da
|
||||
// WithStatus sets the Status 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 Status field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceConditionApplyConfiguration) WithStatus(value v0alpha1.ConditionStatus) *DataPlaneServiceConditionApplyConfiguration {
|
||||
func (b *DataPlaneServiceConditionApplyConfiguration) WithStatus(value aggregationv0alpha1.ConditionStatus) *DataPlaneServiceConditionApplyConfiguration {
|
||||
b.Status = &value
|
||||
return b
|
||||
}
|
||||
|
||||
+7
-7
@@ -5,17 +5,17 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
)
|
||||
|
||||
// DataPlaneServiceSpecApplyConfiguration represents a declarative configuration of the DataPlaneServiceSpec type for use
|
||||
// with apply.
|
||||
type DataPlaneServiceSpecApplyConfiguration struct {
|
||||
PluginID *string `json:"pluginID,omitempty"`
|
||||
PluginType *v0alpha1.PluginType `json:"pluginType,omitempty"`
|
||||
Group *string `json:"group,omitempty"`
|
||||
Version *string `json:"version,omitempty"`
|
||||
Services []ServiceApplyConfiguration `json:"services,omitempty"`
|
||||
PluginID *string `json:"pluginID,omitempty"`
|
||||
PluginType *aggregationv0alpha1.PluginType `json:"pluginType,omitempty"`
|
||||
Group *string `json:"group,omitempty"`
|
||||
Version *string `json:"version,omitempty"`
|
||||
Services []ServiceApplyConfiguration `json:"services,omitempty"`
|
||||
}
|
||||
|
||||
// DataPlaneServiceSpecApplyConfiguration constructs a declarative configuration of the DataPlaneServiceSpec type for use with
|
||||
@@ -35,7 +35,7 @@ func (b *DataPlaneServiceSpecApplyConfiguration) WithPluginID(value string) *Dat
|
||||
// WithPluginType sets the PluginType 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 PluginType field is set to the value of the last call.
|
||||
func (b *DataPlaneServiceSpecApplyConfiguration) WithPluginType(value v0alpha1.PluginType) *DataPlaneServiceSpecApplyConfiguration {
|
||||
func (b *DataPlaneServiceSpecApplyConfiguration) WithPluginType(value aggregationv0alpha1.PluginType) *DataPlaneServiceSpecApplyConfiguration {
|
||||
b.PluginType = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
)
|
||||
|
||||
// ServiceApplyConfiguration represents a declarative configuration of the Service type for use
|
||||
// with apply.
|
||||
type ServiceApplyConfiguration struct {
|
||||
Type *v0alpha1.ServiceType `json:"type,omitempty"`
|
||||
Method *string `json:"method,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
Type *aggregationv0alpha1.ServiceType `json:"type,omitempty"`
|
||||
Method *string `json:"method,omitempty"`
|
||||
Path *string `json:"path,omitempty"`
|
||||
}
|
||||
|
||||
// ServiceApplyConfiguration constructs a declarative configuration of the Service type for use with
|
||||
@@ -25,7 +25,7 @@ func Service() *ServiceApplyConfiguration {
|
||||
// WithType sets the Type 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 Type field is set to the value of the last call.
|
||||
func (b *ServiceApplyConfiguration) WithType(value v0alpha1.ServiceType) *ServiceApplyConfiguration {
|
||||
func (b *ServiceApplyConfiguration) WithType(value aggregationv0alpha1.ServiceType) *ServiceApplyConfiguration {
|
||||
b.Type = &value
|
||||
return b
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sync"
|
||||
fmt "fmt"
|
||||
sync "sync"
|
||||
|
||||
typed "sigs.k8s.io/structured-merge-diff/v4/typed"
|
||||
)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
package versioned
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
fmt "fmt"
|
||||
http "net/http"
|
||||
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/generated/clientset/versioned/typed/aggregation/v0alpha1"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
|
||||
+5
-5
@@ -5,10 +5,10 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
"github.com/grafana/grafana/pkg/aggregator/generated/clientset/versioned/scheme"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
scheme "github.com/grafana/grafana/pkg/aggregator/generated/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -71,10 +71,10 @@ func New(c rest.Interface) *AggregationV0alpha1Client {
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v0alpha1.SchemeGroupVersion
|
||||
gv := aggregationv0alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
|
||||
+16
-15
@@ -5,10 +5,10 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/generated/applyconfiguration/aggregation/v0alpha1"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
applyconfigurationaggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/generated/applyconfiguration/aggregation/v0alpha1"
|
||||
scheme "github.com/grafana/grafana/pkg/aggregator/generated/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -24,36 +24,37 @@ type DataPlaneServicesGetter interface {
|
||||
|
||||
// DataPlaneServiceInterface has methods to work with DataPlaneService resources.
|
||||
type DataPlaneServiceInterface interface {
|
||||
Create(ctx context.Context, dataPlaneService *v0alpha1.DataPlaneService, opts v1.CreateOptions) (*v0alpha1.DataPlaneService, error)
|
||||
Update(ctx context.Context, dataPlaneService *v0alpha1.DataPlaneService, opts v1.UpdateOptions) (*v0alpha1.DataPlaneService, error)
|
||||
Create(ctx context.Context, dataPlaneService *aggregationv0alpha1.DataPlaneService, opts v1.CreateOptions) (*aggregationv0alpha1.DataPlaneService, error)
|
||||
Update(ctx context.Context, dataPlaneService *aggregationv0alpha1.DataPlaneService, opts v1.UpdateOptions) (*aggregationv0alpha1.DataPlaneService, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, dataPlaneService *v0alpha1.DataPlaneService, opts v1.UpdateOptions) (*v0alpha1.DataPlaneService, error)
|
||||
UpdateStatus(ctx context.Context, dataPlaneService *aggregationv0alpha1.DataPlaneService, opts v1.UpdateOptions) (*aggregationv0alpha1.DataPlaneService, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v0alpha1.DataPlaneService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v0alpha1.DataPlaneServiceList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*aggregationv0alpha1.DataPlaneService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*aggregationv0alpha1.DataPlaneServiceList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v0alpha1.DataPlaneService, err error)
|
||||
Apply(ctx context.Context, dataPlaneService *aggregationv0alpha1.DataPlaneServiceApplyConfiguration, opts v1.ApplyOptions) (result *v0alpha1.DataPlaneService, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *aggregationv0alpha1.DataPlaneService, err error)
|
||||
Apply(ctx context.Context, dataPlaneService *applyconfigurationaggregationv0alpha1.DataPlaneServiceApplyConfiguration, opts v1.ApplyOptions) (result *aggregationv0alpha1.DataPlaneService, err error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
ApplyStatus(ctx context.Context, dataPlaneService *aggregationv0alpha1.DataPlaneServiceApplyConfiguration, opts v1.ApplyOptions) (result *v0alpha1.DataPlaneService, err error)
|
||||
ApplyStatus(ctx context.Context, dataPlaneService *applyconfigurationaggregationv0alpha1.DataPlaneServiceApplyConfiguration, opts v1.ApplyOptions) (result *aggregationv0alpha1.DataPlaneService, err error)
|
||||
DataPlaneServiceExpansion
|
||||
}
|
||||
|
||||
// dataPlaneServices implements DataPlaneServiceInterface
|
||||
type dataPlaneServices struct {
|
||||
*gentype.ClientWithListAndApply[*v0alpha1.DataPlaneService, *v0alpha1.DataPlaneServiceList, *aggregationv0alpha1.DataPlaneServiceApplyConfiguration]
|
||||
*gentype.ClientWithListAndApply[*aggregationv0alpha1.DataPlaneService, *aggregationv0alpha1.DataPlaneServiceList, *applyconfigurationaggregationv0alpha1.DataPlaneServiceApplyConfiguration]
|
||||
}
|
||||
|
||||
// newDataPlaneServices returns a DataPlaneServices
|
||||
func newDataPlaneServices(c *AggregationV0alpha1Client) *dataPlaneServices {
|
||||
return &dataPlaneServices{
|
||||
gentype.NewClientWithListAndApply[*v0alpha1.DataPlaneService, *v0alpha1.DataPlaneServiceList, *aggregationv0alpha1.DataPlaneServiceApplyConfiguration](
|
||||
gentype.NewClientWithListAndApply[*aggregationv0alpha1.DataPlaneService, *aggregationv0alpha1.DataPlaneServiceList, *applyconfigurationaggregationv0alpha1.DataPlaneServiceApplyConfiguration](
|
||||
"dataplaneservices",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
"",
|
||||
func() *v0alpha1.DataPlaneService { return &v0alpha1.DataPlaneService{} },
|
||||
func() *v0alpha1.DataPlaneServiceList { return &v0alpha1.DataPlaneServiceList{} }),
|
||||
func() *aggregationv0alpha1.DataPlaneService { return &aggregationv0alpha1.DataPlaneService{} },
|
||||
func() *aggregationv0alpha1.DataPlaneServiceList { return &aggregationv0alpha1.DataPlaneServiceList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ type FakeAggregationV0alpha1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeAggregationV0alpha1) DataPlaneServices() v0alpha1.DataPlaneServiceInterface {
|
||||
return &FakeDataPlaneServices{c}
|
||||
return newFakeDataPlaneServices(c)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
+23
-156
@@ -5,168 +5,35 @@
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
json "encoding/json"
|
||||
"fmt"
|
||||
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/generated/applyconfiguration/aggregation/v0alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
typedaggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/generated/clientset/versioned/typed/aggregation/v0alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeDataPlaneServices implements DataPlaneServiceInterface
|
||||
type FakeDataPlaneServices struct {
|
||||
// fakeDataPlaneServices implements DataPlaneServiceInterface
|
||||
type fakeDataPlaneServices struct {
|
||||
*gentype.FakeClientWithListAndApply[*v0alpha1.DataPlaneService, *v0alpha1.DataPlaneServiceList, *aggregationv0alpha1.DataPlaneServiceApplyConfiguration]
|
||||
Fake *FakeAggregationV0alpha1
|
||||
}
|
||||
|
||||
var dataplaneservicesResource = v0alpha1.SchemeGroupVersion.WithResource("dataplaneservices")
|
||||
|
||||
var dataplaneservicesKind = v0alpha1.SchemeGroupVersion.WithKind("DataPlaneService")
|
||||
|
||||
// Get takes name of the dataPlaneService, and returns the corresponding dataPlaneService object, and an error if there is any.
|
||||
func (c *FakeDataPlaneServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v0alpha1.DataPlaneService, err error) {
|
||||
emptyResult := &v0alpha1.DataPlaneService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetActionWithOptions(dataplaneservicesResource, name, options), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeDataPlaneServices(fake *FakeAggregationV0alpha1) typedaggregationv0alpha1.DataPlaneServiceInterface {
|
||||
return &fakeDataPlaneServices{
|
||||
gentype.NewFakeClientWithListAndApply[*v0alpha1.DataPlaneService, *v0alpha1.DataPlaneServiceList, *aggregationv0alpha1.DataPlaneServiceApplyConfiguration](
|
||||
fake.Fake,
|
||||
"",
|
||||
v0alpha1.SchemeGroupVersion.WithResource("dataplaneservices"),
|
||||
v0alpha1.SchemeGroupVersion.WithKind("DataPlaneService"),
|
||||
func() *v0alpha1.DataPlaneService { return &v0alpha1.DataPlaneService{} },
|
||||
func() *v0alpha1.DataPlaneServiceList { return &v0alpha1.DataPlaneServiceList{} },
|
||||
func(dst, src *v0alpha1.DataPlaneServiceList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v0alpha1.DataPlaneServiceList) []*v0alpha1.DataPlaneService {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v0alpha1.DataPlaneServiceList, items []*v0alpha1.DataPlaneService) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v0alpha1.DataPlaneService), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DataPlaneServices that match those selectors.
|
||||
func (c *FakeDataPlaneServices) List(ctx context.Context, opts v1.ListOptions) (result *v0alpha1.DataPlaneServiceList, err error) {
|
||||
emptyResult := &v0alpha1.DataPlaneServiceList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListActionWithOptions(dataplaneservicesResource, dataplaneservicesKind, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v0alpha1.DataPlaneServiceList{ListMeta: obj.(*v0alpha1.DataPlaneServiceList).ListMeta}
|
||||
for _, item := range obj.(*v0alpha1.DataPlaneServiceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested dataPlaneServices.
|
||||
func (c *FakeDataPlaneServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchActionWithOptions(dataplaneservicesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a dataPlaneService and creates it. Returns the server's representation of the dataPlaneService, and an error, if there is any.
|
||||
func (c *FakeDataPlaneServices) Create(ctx context.Context, dataPlaneService *v0alpha1.DataPlaneService, opts v1.CreateOptions) (result *v0alpha1.DataPlaneService, err error) {
|
||||
emptyResult := &v0alpha1.DataPlaneService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateActionWithOptions(dataplaneservicesResource, dataPlaneService, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v0alpha1.DataPlaneService), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a dataPlaneService and updates it. Returns the server's representation of the dataPlaneService, and an error, if there is any.
|
||||
func (c *FakeDataPlaneServices) Update(ctx context.Context, dataPlaneService *v0alpha1.DataPlaneService, opts v1.UpdateOptions) (result *v0alpha1.DataPlaneService, err error) {
|
||||
emptyResult := &v0alpha1.DataPlaneService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateActionWithOptions(dataplaneservicesResource, dataPlaneService, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v0alpha1.DataPlaneService), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeDataPlaneServices) UpdateStatus(ctx context.Context, dataPlaneService *v0alpha1.DataPlaneService, opts v1.UpdateOptions) (result *v0alpha1.DataPlaneService, err error) {
|
||||
emptyResult := &v0alpha1.DataPlaneService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceActionWithOptions(dataplaneservicesResource, "status", dataPlaneService, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v0alpha1.DataPlaneService), err
|
||||
}
|
||||
|
||||
// Delete takes name of the dataPlaneService and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeDataPlaneServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(dataplaneservicesResource, name, opts), &v0alpha1.DataPlaneService{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeDataPlaneServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionActionWithOptions(dataplaneservicesResource, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v0alpha1.DataPlaneServiceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched dataPlaneService.
|
||||
func (c *FakeDataPlaneServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v0alpha1.DataPlaneService, err error) {
|
||||
emptyResult := &v0alpha1.DataPlaneService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceActionWithOptions(dataplaneservicesResource, name, pt, data, opts, subresources...), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v0alpha1.DataPlaneService), err
|
||||
}
|
||||
|
||||
// Apply takes the given apply declarative configuration, applies it and returns the applied dataPlaneService.
|
||||
func (c *FakeDataPlaneServices) Apply(ctx context.Context, dataPlaneService *aggregationv0alpha1.DataPlaneServiceApplyConfiguration, opts v1.ApplyOptions) (result *v0alpha1.DataPlaneService, err error) {
|
||||
if dataPlaneService == nil {
|
||||
return nil, fmt.Errorf("dataPlaneService provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(dataPlaneService)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := dataPlaneService.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("dataPlaneService.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v0alpha1.DataPlaneService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceActionWithOptions(dataplaneservicesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions()), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v0alpha1.DataPlaneService), err
|
||||
}
|
||||
|
||||
// ApplyStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus().
|
||||
func (c *FakeDataPlaneServices) ApplyStatus(ctx context.Context, dataPlaneService *aggregationv0alpha1.DataPlaneServiceApplyConfiguration, opts v1.ApplyOptions) (result *v0alpha1.DataPlaneService, err error) {
|
||||
if dataPlaneService == nil {
|
||||
return nil, fmt.Errorf("dataPlaneService provided to Apply must not be nil")
|
||||
}
|
||||
data, err := json.Marshal(dataPlaneService)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
name := dataPlaneService.Name
|
||||
if name == nil {
|
||||
return nil, fmt.Errorf("dataPlaneService.Name must be provided to Apply")
|
||||
}
|
||||
emptyResult := &v0alpha1.DataPlaneService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceActionWithOptions(dataplaneservicesResource, *name, types.ApplyPatchType, data, opts.ToPatchOptions(), "status"), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v0alpha1.DataPlaneService), err
|
||||
}
|
||||
|
||||
+8
-8
@@ -5,13 +5,13 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
apisaggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
versioned "github.com/grafana/grafana/pkg/aggregator/generated/clientset/versioned"
|
||||
internalinterfaces "github.com/grafana/grafana/pkg/aggregator/generated/informers/externalversions/internalinterfaces"
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/generated/listers/aggregation/v0alpha1"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/generated/listers/aggregation/v0alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
// DataPlaneServices.
|
||||
type DataPlaneServiceInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v0alpha1.DataPlaneServiceLister
|
||||
Lister() aggregationv0alpha1.DataPlaneServiceLister
|
||||
}
|
||||
|
||||
type dataPlaneServiceInformer struct {
|
||||
@@ -56,7 +56,7 @@ func NewFilteredDataPlaneServiceInformer(client versioned.Interface, resyncPerio
|
||||
return client.AggregationV0alpha1().DataPlaneServices().Watch(context.TODO(), options)
|
||||
},
|
||||
},
|
||||
&aggregationv0alpha1.DataPlaneService{},
|
||||
&apisaggregationv0alpha1.DataPlaneService{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -67,9 +67,9 @@ func (f *dataPlaneServiceInformer) defaultInformer(client versioned.Interface, r
|
||||
}
|
||||
|
||||
func (f *dataPlaneServiceInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&aggregationv0alpha1.DataPlaneService{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisaggregationv0alpha1.DataPlaneService{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *dataPlaneServiceInformer) Lister() v0alpha1.DataPlaneServiceLister {
|
||||
return v0alpha1.NewDataPlaneServiceLister(f.Informer().GetIndexer())
|
||||
func (f *dataPlaneServiceInformer) Lister() aggregationv0alpha1.DataPlaneServiceLister {
|
||||
return aggregationv0alpha1.NewDataPlaneServiceLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
package externalversions
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
fmt "fmt"
|
||||
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
package v0alpha1
|
||||
|
||||
import (
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
"k8s.io/client-go/listers"
|
||||
"k8s.io/client-go/tools/cache"
|
||||
aggregationv0alpha1 "github.com/grafana/grafana/pkg/aggregator/apis/aggregation/v0alpha1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
listers "k8s.io/client-go/listers"
|
||||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// DataPlaneServiceLister helps list DataPlaneServices.
|
||||
@@ -16,19 +16,19 @@ import (
|
||||
type DataPlaneServiceLister interface {
|
||||
// List lists all DataPlaneServices in the indexer.
|
||||
// Objects returned here must be treated as read-only.
|
||||
List(selector labels.Selector) (ret []*v0alpha1.DataPlaneService, err error)
|
||||
List(selector labels.Selector) (ret []*aggregationv0alpha1.DataPlaneService, err error)
|
||||
// Get retrieves the DataPlaneService from the index for a given name.
|
||||
// Objects returned here must be treated as read-only.
|
||||
Get(name string) (*v0alpha1.DataPlaneService, error)
|
||||
Get(name string) (*aggregationv0alpha1.DataPlaneService, error)
|
||||
DataPlaneServiceListerExpansion
|
||||
}
|
||||
|
||||
// dataPlaneServiceLister implements the DataPlaneServiceLister interface.
|
||||
type dataPlaneServiceLister struct {
|
||||
listers.ResourceIndexer[*v0alpha1.DataPlaneService]
|
||||
listers.ResourceIndexer[*aggregationv0alpha1.DataPlaneService]
|
||||
}
|
||||
|
||||
// NewDataPlaneServiceLister returns a new DataPlaneServiceLister.
|
||||
func NewDataPlaneServiceLister(indexer cache.Indexer) DataPlaneServiceLister {
|
||||
return &dataPlaneServiceLister{listers.New[*v0alpha1.DataPlaneService](indexer, v0alpha1.Resource("dataplaneservice"))}
|
||||
return &dataPlaneServiceLister{listers.New[*aggregationv0alpha1.DataPlaneService](indexer, aggregationv0alpha1.Resource("dataplaneservice"))}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user