mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 18:09:57 +00:00
configure QPS and Burst for the flags of klusterlet agents (#344)
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
This commit is contained in:
@@ -59,7 +59,7 @@ metadata:
|
||||
categories: Integration & Delivery,OpenShift Optional
|
||||
certified: "false"
|
||||
containerImage: quay.io/open-cluster-management/registration-operator:latest
|
||||
createdAt: "2023-12-07T15:16:47Z"
|
||||
createdAt: "2024-01-15T16:05:25Z"
|
||||
description: Manages the installation and upgrade of the ClusterManager.
|
||||
operators.operatorframework.io/builder: operator-sdk-v1.32.0
|
||||
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
|
||||
|
||||
@@ -223,6 +223,20 @@ spec:
|
||||
- feature
|
||||
type: object
|
||||
type: array
|
||||
kubeAPIBurst:
|
||||
default: 100
|
||||
description: 'KubeAPIBurst indicates the maximum burst of the
|
||||
throttle while talking with apiserver of hub cluster from the
|
||||
spoke cluster. If it is set empty, use the default value: 100'
|
||||
format: int32
|
||||
type: integer
|
||||
kubeAPIQPS:
|
||||
default: 50
|
||||
description: 'KubeAPIQPS indicates the maximum QPS while talking
|
||||
with apiserver of hub cluster from the spoke cluster. If it
|
||||
is set empty, use the default value: 50'
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
registrationImagePullSpec:
|
||||
description: RegistrationImagePullSpec represents the desired image
|
||||
@@ -274,6 +288,20 @@ spec:
|
||||
- feature
|
||||
type: object
|
||||
type: array
|
||||
kubeAPIBurst:
|
||||
default: 100
|
||||
description: 'KubeAPIBurst indicates the maximum burst of the
|
||||
throttle while talking with apiserver of hub cluster from the
|
||||
spoke cluster. If it is set empty, use the default value: 100'
|
||||
format: int32
|
||||
type: integer
|
||||
kubeAPIQPS:
|
||||
default: 50
|
||||
description: 'KubeAPIQPS indicates the maximum QPS while talking
|
||||
with apiserver of hub cluster from the spoke cluster. If it
|
||||
is set empty, use the default value: 50'
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
workImagePullSpec:
|
||||
description: WorkImagePullSpec represents the desired image configuration
|
||||
|
||||
@@ -31,7 +31,7 @@ metadata:
|
||||
categories: Integration & Delivery,OpenShift Optional
|
||||
certified: "false"
|
||||
containerImage: quay.io/open-cluster-management/registration-operator:latest
|
||||
createdAt: "2023-12-07T15:16:47Z"
|
||||
createdAt: "2024-01-15T16:05:25Z"
|
||||
description: Manages the installation and upgrade of the Klusterlet.
|
||||
operators.operatorframework.io/builder: operator-sdk-v1.32.0
|
||||
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
|
||||
|
||||
@@ -223,6 +223,20 @@ spec:
|
||||
- feature
|
||||
type: object
|
||||
type: array
|
||||
kubeAPIBurst:
|
||||
default: 100
|
||||
description: 'KubeAPIBurst indicates the maximum burst of the
|
||||
throttle while talking with apiserver of hub cluster from the
|
||||
spoke cluster. If it is set empty, use the default value: 100'
|
||||
format: int32
|
||||
type: integer
|
||||
kubeAPIQPS:
|
||||
default: 50
|
||||
description: 'KubeAPIQPS indicates the maximum QPS while talking
|
||||
with apiserver of hub cluster from the spoke cluster. If it
|
||||
is set empty, use the default value: 50'
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
registrationImagePullSpec:
|
||||
description: RegistrationImagePullSpec represents the desired image
|
||||
@@ -274,6 +288,20 @@ spec:
|
||||
- feature
|
||||
type: object
|
||||
type: array
|
||||
kubeAPIBurst:
|
||||
default: 100
|
||||
description: 'KubeAPIBurst indicates the maximum burst of the
|
||||
throttle while talking with apiserver of hub cluster from the
|
||||
spoke cluster. If it is set empty, use the default value: 100'
|
||||
format: int32
|
||||
type: integer
|
||||
kubeAPIQPS:
|
||||
default: 50
|
||||
description: 'KubeAPIQPS indicates the maximum QPS while talking
|
||||
with apiserver of hub cluster from the spoke cluster. If it
|
||||
is set empty, use the default value: 50'
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
workImagePullSpec:
|
||||
description: WorkImagePullSpec represents the desired image configuration
|
||||
|
||||
2
go.mod
2
go.mod
@@ -34,7 +34,7 @@ require (
|
||||
k8s.io/kube-aggregator v0.28.1
|
||||
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
|
||||
open-cluster-management.io/addon-framework v0.8.1-0.20240102072130-44852ea0722f
|
||||
open-cluster-management.io/api v0.12.1-0.20240103082609-f6404f30c42c
|
||||
open-cluster-management.io/api v0.12.1-0.20240115071352-3d94ce8f3499
|
||||
open-cluster-management.io/sdk-go v0.0.0-20240117083639-69270b03020c
|
||||
sigs.k8s.io/controller-runtime v0.16.2
|
||||
sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96
|
||||
|
||||
4
go.sum
4
go.sum
@@ -768,8 +768,8 @@ k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCf
|
||||
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
open-cluster-management.io/addon-framework v0.8.1-0.20240102072130-44852ea0722f h1:R5IbFdM4g+kDyONZ1/q67/czRwgDkq9Q7ETZ3RhGaAg=
|
||||
open-cluster-management.io/addon-framework v0.8.1-0.20240102072130-44852ea0722f/go.mod h1:aj97pgpGJ0/LpQzBVtU2oDFqqIiZLOPnsjLKG/sVkFw=
|
||||
open-cluster-management.io/api v0.12.1-0.20240103082609-f6404f30c42c h1:Z/xoxtc5lDw0j+SqTbePgm5xGNxAmC+Res6dTe0xhM4=
|
||||
open-cluster-management.io/api v0.12.1-0.20240103082609-f6404f30c42c/go.mod h1:K3Rza3qN/W1+E1a+wbLtFatvdI8UlQWkSqBlpeRHMPw=
|
||||
open-cluster-management.io/api v0.12.1-0.20240115071352-3d94ce8f3499 h1:Odh200i57Z9V44eJak98VqdKMCAlj3m9dtnUp8285nE=
|
||||
open-cluster-management.io/api v0.12.1-0.20240115071352-3d94ce8f3499/go.mod h1:K3Rza3qN/W1+E1a+wbLtFatvdI8UlQWkSqBlpeRHMPw=
|
||||
open-cluster-management.io/sdk-go v0.0.0-20240117083639-69270b03020c h1:0/Y9YSSLT6+D6kc3ZNiHKK53tsxJJyrfSo0U3NUfB2U=
|
||||
open-cluster-management.io/sdk-go v0.0.0-20240117083639-69270b03020c/go.mod h1:GQC47u00mTaMXumHGdiWmcgeCwXCs1R171gXADWsNrs=
|
||||
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
|
||||
|
||||
@@ -84,6 +84,12 @@ spec:
|
||||
- "--spoke-kubeconfig=/spoke/config/kubeconfig"
|
||||
- "--terminate-on-files=/spoke/config/kubeconfig"
|
||||
{{end}}
|
||||
{{if gt .AgentKubeAPIQPS 0.0}}
|
||||
- "--kube-api-qps={{ .AgentKubeAPIQPS }}"
|
||||
{{end}}
|
||||
{{if gt .AgentKubeAPIBurst 0}}
|
||||
- "--kube-api-burst={{ .AgentKubeAPIBurst }}"
|
||||
{{end}}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
|
||||
@@ -75,6 +75,12 @@ spec:
|
||||
{{if .ClusterAnnotationsString}}
|
||||
- "--cluster-annotations={{ .ClusterAnnotationsString }}"
|
||||
{{end}}
|
||||
{{if gt .RegistrationKubeAPIQPS 0.0}}
|
||||
- "--kube-api-qps={{ .RegistrationKubeAPIQPS }}"
|
||||
{{end}}
|
||||
{{if gt .RegistrationKubeAPIBurst 0}}
|
||||
- "--kube-api-burst={{ .RegistrationKubeAPIBurst }}"
|
||||
{{end}}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
|
||||
@@ -70,6 +70,12 @@ spec:
|
||||
- "--disable-leader-election"
|
||||
- "--status-sync-interval=60s"
|
||||
{{end}}
|
||||
{{if gt .WorkKubeAPIQPS 0.0}}
|
||||
- "--kube-api-qps={{ .WorkKubeAPIQPS }}"
|
||||
{{end}}
|
||||
{{if gt .WorkKubeAPIBurst 0}}
|
||||
- "--kube-api-burst={{ .WorkKubeAPIBurst }}"
|
||||
{{end}}
|
||||
env:
|
||||
- name: POD_NAME
|
||||
valueFrom:
|
||||
|
||||
@@ -120,22 +120,27 @@ type klusterletConfig struct {
|
||||
// namespace as KlusterletNamespace;
|
||||
// 2). In the Hosted mode, it is on the management cluster and has the same name as
|
||||
// the klusterlet.
|
||||
AgentNamespace string
|
||||
AgentID string
|
||||
RegistrationImage string
|
||||
WorkImage string
|
||||
SingletonImage string
|
||||
RegistrationServiceAccount string
|
||||
WorkServiceAccount string
|
||||
ClusterName string
|
||||
ExternalServerURL string
|
||||
HubKubeConfigSecret string
|
||||
BootStrapKubeConfigSecret string
|
||||
OperatorNamespace string
|
||||
Replica int32
|
||||
ClientCertExpirationSeconds int32
|
||||
ClusterAnnotationsString string
|
||||
|
||||
AgentNamespace string
|
||||
AgentID string
|
||||
RegistrationImage string
|
||||
WorkImage string
|
||||
SingletonImage string
|
||||
RegistrationServiceAccount string
|
||||
WorkServiceAccount string
|
||||
ClusterName string
|
||||
ExternalServerURL string
|
||||
HubKubeConfigSecret string
|
||||
BootStrapKubeConfigSecret string
|
||||
OperatorNamespace string
|
||||
Replica int32
|
||||
ClientCertExpirationSeconds int32
|
||||
ClusterAnnotationsString string
|
||||
RegistrationKubeAPIQPS float32
|
||||
RegistrationKubeAPIBurst int32
|
||||
WorkKubeAPIQPS float32
|
||||
WorkKubeAPIBurst int32
|
||||
AgentKubeAPIQPS float32
|
||||
AgentKubeAPIBurst int32
|
||||
ExternalManagedKubeConfigSecret string
|
||||
ExternalManagedKubeConfigRegistrationSecret string
|
||||
ExternalManagedKubeConfigWorkSecret string
|
||||
@@ -241,6 +246,8 @@ func (n *klusterletController) sync(ctx context.Context, controllerContext facto
|
||||
if klusterlet.Spec.RegistrationConfiguration != nil {
|
||||
registrationFeatureGates = klusterlet.Spec.RegistrationConfiguration.FeatureGates
|
||||
config.ClientCertExpirationSeconds = klusterlet.Spec.RegistrationConfiguration.ClientCertExpirationSeconds
|
||||
config.RegistrationKubeAPIQPS = float32(klusterlet.Spec.RegistrationConfiguration.KubeAPIQPS)
|
||||
config.RegistrationKubeAPIBurst = klusterlet.Spec.RegistrationConfiguration.KubeAPIBurst
|
||||
|
||||
// construct cluster annotations string, the final format is "key1=value1,key2=value2"
|
||||
var annotationsArray []string
|
||||
@@ -255,10 +262,23 @@ func (n *klusterletController) sync(ctx context.Context, controllerContext facto
|
||||
var workFeatureGates []operatorapiv1.FeatureGate
|
||||
if klusterlet.Spec.WorkConfiguration != nil {
|
||||
workFeatureGates = klusterlet.Spec.WorkConfiguration.FeatureGates
|
||||
config.WorkKubeAPIQPS = float32(klusterlet.Spec.WorkConfiguration.KubeAPIQPS)
|
||||
config.WorkKubeAPIBurst = klusterlet.Spec.WorkConfiguration.KubeAPIBurst
|
||||
}
|
||||
|
||||
config.WorkFeatureGates, workFeatureMsgs = helpers.ConvertToFeatureGateFlags("Work", workFeatureGates, ocmfeature.DefaultSpokeWorkFeatureGates)
|
||||
meta.SetStatusCondition(&klusterlet.Status.Conditions, helpers.BuildFeatureCondition(registrationFeatureMsgs, workFeatureMsgs))
|
||||
|
||||
// for singleton agent, the QPS and Burst use the max one between the configurations of registration and work
|
||||
config.AgentKubeAPIQPS = config.RegistrationKubeAPIQPS
|
||||
if config.AgentKubeAPIQPS < config.WorkKubeAPIQPS {
|
||||
config.AgentKubeAPIQPS = config.WorkKubeAPIQPS
|
||||
}
|
||||
config.AgentKubeAPIBurst = config.RegistrationKubeAPIBurst
|
||||
if config.AgentKubeAPIBurst < config.WorkKubeAPIBurst {
|
||||
config.AgentKubeAPIBurst = config.WorkKubeAPIBurst
|
||||
}
|
||||
|
||||
reconcilers := []klusterletReconcile{
|
||||
&crdReconcile{
|
||||
managedClusterClients: managedClusterClients,
|
||||
|
||||
@@ -111,6 +111,12 @@ func newKlusterlet(name, namespace, clustername string) *operatorapiv1.Klusterle
|
||||
Mode: "Enable",
|
||||
},
|
||||
},
|
||||
KubeAPIQPS: 10,
|
||||
KubeAPIBurst: 60,
|
||||
},
|
||||
WorkConfiguration: &operatorapiv1.WorkAgentConfiguration{
|
||||
KubeAPIQPS: 20,
|
||||
KubeAPIBurst: 50,
|
||||
},
|
||||
HubApiServerHostAlias: &operatorapiv1.HubApiServerHostAlias{
|
||||
IP: "11.22.33.44",
|
||||
@@ -388,6 +394,8 @@ func assertRegistrationDeployment(t *testing.T, actions []clienttesting.Action,
|
||||
expectedArgs = append(expectedArgs, "--disable-leader-election")
|
||||
}
|
||||
|
||||
expectedArgs = append(expectedArgs, "--kube-api-qps=10", "--kube-api-burst=60")
|
||||
|
||||
if !equality.Semantic.DeepEqual(args, expectedArgs) {
|
||||
t.Errorf("Expect args %v, but got %v", expectedArgs, args)
|
||||
return
|
||||
@@ -430,6 +438,8 @@ func assertWorkDeployment(t *testing.T, actions []clienttesting.Action, verb, cl
|
||||
expectArgs = append(expectArgs, "--disable-leader-election", "--status-sync-interval=60s")
|
||||
}
|
||||
|
||||
expectArgs = append(expectArgs, "--kube-api-qps=20", "--kube-api-burst=50")
|
||||
|
||||
if !equality.Semantic.DeepEqual(args, expectArgs) {
|
||||
t.Errorf("Expect args %v, but got %v", expectArgs, args)
|
||||
return
|
||||
|
||||
@@ -821,7 +821,7 @@ var _ = ginkgo.Describe("Klusterlet", func() {
|
||||
|
||||
ginkgo.It("feature gates configuration is nil or empty", func() {
|
||||
klusterlet.Spec.RegistrationConfiguration = nil
|
||||
klusterlet.Spec.WorkConfiguration = &operatorapiv1.WorkConfiguration{}
|
||||
klusterlet.Spec.WorkConfiguration = &operatorapiv1.WorkAgentConfiguration{}
|
||||
|
||||
ginkgo.By("Create the klusterlet with RegistrationConfiguration nil and WorkConfiguration empty")
|
||||
_, err := operatorClient.OperatorV1().Klusterlets().Create(context.Background(),
|
||||
@@ -944,7 +944,7 @@ var _ = ginkgo.Describe("Klusterlet", func() {
|
||||
"agent.open-cluster-management.io/foo": "bar",
|
||||
},
|
||||
}
|
||||
klusterlet.Spec.WorkConfiguration = &operatorapiv1.WorkConfiguration{
|
||||
klusterlet.Spec.WorkConfiguration = &operatorapiv1.WorkAgentConfiguration{
|
||||
FeatureGates: []operatorapiv1.FeatureGate{
|
||||
{
|
||||
Feature: string(ocmfeature.ExecutorValidatingCaches),
|
||||
@@ -1026,7 +1026,7 @@ var _ = ginkgo.Describe("Klusterlet", func() {
|
||||
},
|
||||
},
|
||||
}
|
||||
klusterlet.Spec.WorkConfiguration = &operatorapiv1.WorkConfiguration{
|
||||
klusterlet.Spec.WorkConfiguration = &operatorapiv1.WorkAgentConfiguration{
|
||||
FeatureGates: []operatorapiv1.FeatureGate{
|
||||
{
|
||||
Feature: "Bar",
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -1498,7 +1498,7 @@ open-cluster-management.io/addon-framework/pkg/index
|
||||
open-cluster-management.io/addon-framework/pkg/manager/controllers/addonconfiguration
|
||||
open-cluster-management.io/addon-framework/pkg/manager/controllers/addonowner
|
||||
open-cluster-management.io/addon-framework/pkg/utils
|
||||
# open-cluster-management.io/api v0.12.1-0.20240103082609-f6404f30c42c
|
||||
# open-cluster-management.io/api v0.12.1-0.20240115071352-3d94ce8f3499
|
||||
## explicit; go 1.20
|
||||
open-cluster-management.io/api/addon/v1alpha1
|
||||
open-cluster-management.io/api/client/addon/clientset/versioned
|
||||
|
||||
1
vendor/open-cluster-management.io/api/addon/v1alpha1/doc.go
generated
vendored
1
vendor/open-cluster-management.io/api/addon/v1alpha1/doc.go
generated
vendored
@@ -1,6 +1,5 @@
|
||||
// Package v1alpha1 contains API Schema definitions for the addon v1alpha1 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
|
||||
4
vendor/open-cluster-management.io/api/client/addon/clientset/versioned/doc.go
generated
vendored
4
vendor/open-cluster-management.io/api/client/addon/clientset/versioned/doc.go
generated
vendored
@@ -1,4 +0,0 @@
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package versioned
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -20,9 +19,9 @@ type FakeAddOnDeploymentConfigs struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var addondeploymentconfigsResource = schema.GroupVersionResource{Group: "addon.open-cluster-management.io", Version: "v1alpha1", Resource: "addondeploymentconfigs"}
|
||||
var addondeploymentconfigsResource = v1alpha1.SchemeGroupVersion.WithResource("addondeploymentconfigs")
|
||||
|
||||
var addondeploymentconfigsKind = schema.GroupVersionKind{Group: "addon.open-cluster-management.io", Version: "v1alpha1", Kind: "AddOnDeploymentConfig"}
|
||||
var addondeploymentconfigsKind = v1alpha1.SchemeGroupVersion.WithKind("AddOnDeploymentConfig")
|
||||
|
||||
// Get takes name of the addOnDeploymentConfig, and returns the corresponding addOnDeploymentConfig object, and an error if there is any.
|
||||
func (c *FakeAddOnDeploymentConfigs) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AddOnDeploymentConfig, err error) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -19,9 +18,9 @@ type FakeAddOnTemplates struct {
|
||||
Fake *FakeAddonV1alpha1
|
||||
}
|
||||
|
||||
var addontemplatesResource = schema.GroupVersionResource{Group: "addon.open-cluster-management.io", Version: "v1alpha1", Resource: "addontemplates"}
|
||||
var addontemplatesResource = v1alpha1.SchemeGroupVersion.WithResource("addontemplates")
|
||||
|
||||
var addontemplatesKind = schema.GroupVersionKind{Group: "addon.open-cluster-management.io", Version: "v1alpha1", Kind: "AddOnTemplate"}
|
||||
var addontemplatesKind = v1alpha1.SchemeGroupVersion.WithKind("AddOnTemplate")
|
||||
|
||||
// Get takes name of the addOnTemplate, and returns the corresponding addOnTemplate object, and an error if there is any.
|
||||
func (c *FakeAddOnTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AddOnTemplate, err error) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -19,9 +18,9 @@ type FakeClusterManagementAddOns struct {
|
||||
Fake *FakeAddonV1alpha1
|
||||
}
|
||||
|
||||
var clustermanagementaddonsResource = schema.GroupVersionResource{Group: "addon.open-cluster-management.io", Version: "v1alpha1", Resource: "clustermanagementaddons"}
|
||||
var clustermanagementaddonsResource = v1alpha1.SchemeGroupVersion.WithResource("clustermanagementaddons")
|
||||
|
||||
var clustermanagementaddonsKind = schema.GroupVersionKind{Group: "addon.open-cluster-management.io", Version: "v1alpha1", Kind: "ClusterManagementAddOn"}
|
||||
var clustermanagementaddonsKind = v1alpha1.SchemeGroupVersion.WithKind("ClusterManagementAddOn")
|
||||
|
||||
// Get takes name of the clusterManagementAddOn, and returns the corresponding clusterManagementAddOn object, and an error if there is any.
|
||||
func (c *FakeClusterManagementAddOns) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterManagementAddOn, err error) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -20,9 +19,9 @@ type FakeManagedClusterAddOns struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var managedclusteraddonsResource = schema.GroupVersionResource{Group: "addon.open-cluster-management.io", Version: "v1alpha1", Resource: "managedclusteraddons"}
|
||||
var managedclusteraddonsResource = v1alpha1.SchemeGroupVersion.WithResource("managedclusteraddons")
|
||||
|
||||
var managedclusteraddonsKind = schema.GroupVersionKind{Group: "addon.open-cluster-management.io", Version: "v1alpha1", Kind: "ManagedClusterAddOn"}
|
||||
var managedclusteraddonsKind = v1alpha1.SchemeGroupVersion.WithKind("ManagedClusterAddOn")
|
||||
|
||||
// Get takes name of the managedClusterAddOn, and returns the corresponding managedClusterAddOn object, and an error if there is any.
|
||||
func (c *FakeManagedClusterAddOns) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ManagedClusterAddOn, err error) {
|
||||
|
||||
@@ -150,7 +150,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref
|
||||
return res
|
||||
}
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
@@ -223,7 +223,7 @@ type SharedInformerFactory interface {
|
||||
// ForResource gives generic access to a shared informer of the matching type.
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer
|
||||
|
||||
|
||||
4
vendor/open-cluster-management.io/api/client/cluster/clientset/versioned/doc.go
generated
vendored
4
vendor/open-cluster-management.io/api/client/cluster/clientset/versioned/doc.go
generated
vendored
@@ -1,4 +0,0 @@
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package versioned
|
||||
@@ -5,13 +5,12 @@ package fake
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
clusterv1 "open-cluster-management.io/api/cluster/v1"
|
||||
v1 "open-cluster-management.io/api/cluster/v1"
|
||||
)
|
||||
|
||||
// FakeManagedClusters implements ManagedClusterInterface
|
||||
@@ -19,24 +18,24 @@ type FakeManagedClusters struct {
|
||||
Fake *FakeClusterV1
|
||||
}
|
||||
|
||||
var managedclustersResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1", Resource: "managedclusters"}
|
||||
var managedclustersResource = v1.SchemeGroupVersion.WithResource("managedclusters")
|
||||
|
||||
var managedclustersKind = schema.GroupVersionKind{Group: "cluster.open-cluster-management.io", Version: "v1", Kind: "ManagedCluster"}
|
||||
var managedclustersKind = v1.SchemeGroupVersion.WithKind("ManagedCluster")
|
||||
|
||||
// Get takes name of the managedCluster, and returns the corresponding managedCluster object, and an error if there is any.
|
||||
func (c *FakeManagedClusters) Get(ctx context.Context, name string, options v1.GetOptions) (result *clusterv1.ManagedCluster, err error) {
|
||||
func (c *FakeManagedClusters) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ManagedCluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(managedclustersResource, name), &clusterv1.ManagedCluster{})
|
||||
Invokes(testing.NewRootGetAction(managedclustersResource, name), &v1.ManagedCluster{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*clusterv1.ManagedCluster), err
|
||||
return obj.(*v1.ManagedCluster), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ManagedClusters that match those selectors.
|
||||
func (c *FakeManagedClusters) List(ctx context.Context, opts v1.ListOptions) (result *clusterv1.ManagedClusterList, err error) {
|
||||
func (c *FakeManagedClusters) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ManagedClusterList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(managedclustersResource, managedclustersKind, opts), &clusterv1.ManagedClusterList{})
|
||||
Invokes(testing.NewRootListAction(managedclustersResource, managedclustersKind, opts), &v1.ManagedClusterList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -45,8 +44,8 @@ func (c *FakeManagedClusters) List(ctx context.Context, opts v1.ListOptions) (re
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &clusterv1.ManagedClusterList{ListMeta: obj.(*clusterv1.ManagedClusterList).ListMeta}
|
||||
for _, item := range obj.(*clusterv1.ManagedClusterList).Items {
|
||||
list := &v1.ManagedClusterList{ListMeta: obj.(*v1.ManagedClusterList).ListMeta}
|
||||
for _, item := range obj.(*v1.ManagedClusterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -55,63 +54,63 @@ func (c *FakeManagedClusters) List(ctx context.Context, opts v1.ListOptions) (re
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested managedClusters.
|
||||
func (c *FakeManagedClusters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeManagedClusters) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(managedclustersResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a managedCluster and creates it. Returns the server's representation of the managedCluster, and an error, if there is any.
|
||||
func (c *FakeManagedClusters) Create(ctx context.Context, managedCluster *clusterv1.ManagedCluster, opts v1.CreateOptions) (result *clusterv1.ManagedCluster, err error) {
|
||||
func (c *FakeManagedClusters) Create(ctx context.Context, managedCluster *v1.ManagedCluster, opts metav1.CreateOptions) (result *v1.ManagedCluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(managedclustersResource, managedCluster), &clusterv1.ManagedCluster{})
|
||||
Invokes(testing.NewRootCreateAction(managedclustersResource, managedCluster), &v1.ManagedCluster{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*clusterv1.ManagedCluster), err
|
||||
return obj.(*v1.ManagedCluster), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a managedCluster and updates it. Returns the server's representation of the managedCluster, and an error, if there is any.
|
||||
func (c *FakeManagedClusters) Update(ctx context.Context, managedCluster *clusterv1.ManagedCluster, opts v1.UpdateOptions) (result *clusterv1.ManagedCluster, err error) {
|
||||
func (c *FakeManagedClusters) Update(ctx context.Context, managedCluster *v1.ManagedCluster, opts metav1.UpdateOptions) (result *v1.ManagedCluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(managedclustersResource, managedCluster), &clusterv1.ManagedCluster{})
|
||||
Invokes(testing.NewRootUpdateAction(managedclustersResource, managedCluster), &v1.ManagedCluster{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*clusterv1.ManagedCluster), err
|
||||
return obj.(*v1.ManagedCluster), 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 *FakeManagedClusters) UpdateStatus(ctx context.Context, managedCluster *clusterv1.ManagedCluster, opts v1.UpdateOptions) (*clusterv1.ManagedCluster, error) {
|
||||
func (c *FakeManagedClusters) UpdateStatus(ctx context.Context, managedCluster *v1.ManagedCluster, opts metav1.UpdateOptions) (*v1.ManagedCluster, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(managedclustersResource, "status", managedCluster), &clusterv1.ManagedCluster{})
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(managedclustersResource, "status", managedCluster), &v1.ManagedCluster{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*clusterv1.ManagedCluster), err
|
||||
return obj.(*v1.ManagedCluster), err
|
||||
}
|
||||
|
||||
// Delete takes name of the managedCluster and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeManagedClusters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeManagedClusters) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(managedclustersResource, name, opts), &clusterv1.ManagedCluster{})
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(managedclustersResource, name, opts), &v1.ManagedCluster{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeManagedClusters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeManagedClusters) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(managedclustersResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &clusterv1.ManagedClusterList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.ManagedClusterList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched managedCluster.
|
||||
func (c *FakeManagedClusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *clusterv1.ManagedCluster, err error) {
|
||||
func (c *FakeManagedClusters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ManagedCluster, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(managedclustersResource, name, pt, data, subresources...), &clusterv1.ManagedCluster{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(managedclustersResource, name, pt, data, subresources...), &v1.ManagedCluster{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*clusterv1.ManagedCluster), err
|
||||
return obj.(*v1.ManagedCluster), err
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -20,9 +19,9 @@ type FakeAddOnPlacementScores struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var addonplacementscoresResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1alpha1", Resource: "addonplacementscores"}
|
||||
var addonplacementscoresResource = v1alpha1.SchemeGroupVersion.WithResource("addonplacementscores")
|
||||
|
||||
var addonplacementscoresKind = schema.GroupVersionKind{Group: "cluster.open-cluster-management.io", Version: "v1alpha1", Kind: "AddOnPlacementScore"}
|
||||
var addonplacementscoresKind = v1alpha1.SchemeGroupVersion.WithKind("AddOnPlacementScore")
|
||||
|
||||
// Get takes name of the addOnPlacementScore, and returns the corresponding addOnPlacementScore object, and an error if there is any.
|
||||
func (c *FakeAddOnPlacementScores) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.AddOnPlacementScore, err error) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -19,9 +18,9 @@ type FakeClusterClaims struct {
|
||||
Fake *FakeClusterV1alpha1
|
||||
}
|
||||
|
||||
var clusterclaimsResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1alpha1", Resource: "clusterclaims"}
|
||||
var clusterclaimsResource = v1alpha1.SchemeGroupVersion.WithResource("clusterclaims")
|
||||
|
||||
var clusterclaimsKind = schema.GroupVersionKind{Group: "cluster.open-cluster-management.io", Version: "v1alpha1", Kind: "ClusterClaim"}
|
||||
var clusterclaimsKind = v1alpha1.SchemeGroupVersion.WithKind("ClusterClaim")
|
||||
|
||||
// Get takes name of the clusterClaim, and returns the corresponding clusterClaim object, and an error if there is any.
|
||||
func (c *FakeClusterClaims) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ClusterClaim, err error) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -20,9 +19,9 @@ type FakePlacements struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var placementsResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1beta1", Resource: "placements"}
|
||||
var placementsResource = v1beta1.SchemeGroupVersion.WithResource("placements")
|
||||
|
||||
var placementsKind = schema.GroupVersionKind{Group: "cluster.open-cluster-management.io", Version: "v1beta1", Kind: "Placement"}
|
||||
var placementsKind = v1beta1.SchemeGroupVersion.WithKind("Placement")
|
||||
|
||||
// Get takes name of the placement, and returns the corresponding placement object, and an error if there is any.
|
||||
func (c *FakePlacements) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Placement, err error) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -20,9 +19,9 @@ type FakePlacementDecisions struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var placementdecisionsResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1beta1", Resource: "placementdecisions"}
|
||||
var placementdecisionsResource = v1beta1.SchemeGroupVersion.WithResource("placementdecisions")
|
||||
|
||||
var placementdecisionsKind = schema.GroupVersionKind{Group: "cluster.open-cluster-management.io", Version: "v1beta1", Kind: "PlacementDecision"}
|
||||
var placementdecisionsKind = v1beta1.SchemeGroupVersion.WithKind("PlacementDecision")
|
||||
|
||||
// Get takes name of the placementDecision, and returns the corresponding placementDecision object, and an error if there is any.
|
||||
func (c *FakePlacementDecisions) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.PlacementDecision, err error) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -19,9 +18,9 @@ type FakeManagedClusterSets struct {
|
||||
Fake *FakeClusterV1beta2
|
||||
}
|
||||
|
||||
var managedclustersetsResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1beta2", Resource: "managedclustersets"}
|
||||
var managedclustersetsResource = v1beta2.SchemeGroupVersion.WithResource("managedclustersets")
|
||||
|
||||
var managedclustersetsKind = schema.GroupVersionKind{Group: "cluster.open-cluster-management.io", Version: "v1beta2", Kind: "ManagedClusterSet"}
|
||||
var managedclustersetsKind = v1beta2.SchemeGroupVersion.WithKind("ManagedClusterSet")
|
||||
|
||||
// Get takes name of the managedClusterSet, and returns the corresponding managedClusterSet object, and an error if there is any.
|
||||
func (c *FakeManagedClusterSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ManagedClusterSet, err error) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -20,9 +19,9 @@ type FakeManagedClusterSetBindings struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var managedclustersetbindingsResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1beta2", Resource: "managedclustersetbindings"}
|
||||
var managedclustersetbindingsResource = v1beta2.SchemeGroupVersion.WithResource("managedclustersetbindings")
|
||||
|
||||
var managedclustersetbindingsKind = schema.GroupVersionKind{Group: "cluster.open-cluster-management.io", Version: "v1beta2", Kind: "ManagedClusterSetBinding"}
|
||||
var managedclustersetbindingsKind = v1beta2.SchemeGroupVersion.WithKind("ManagedClusterSetBinding")
|
||||
|
||||
// Get takes name of the managedClusterSetBinding, and returns the corresponding managedClusterSetBinding object, and an error if there is any.
|
||||
func (c *FakeManagedClusterSetBindings) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.ManagedClusterSetBinding, err error) {
|
||||
|
||||
@@ -150,7 +150,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref
|
||||
return res
|
||||
}
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
@@ -223,7 +223,7 @@ type SharedInformerFactory interface {
|
||||
// ForResource gives generic access to a shared informer of the matching type.
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer
|
||||
|
||||
|
||||
4
vendor/open-cluster-management.io/api/client/operator/clientset/versioned/doc.go
generated
vendored
4
vendor/open-cluster-management.io/api/client/operator/clientset/versioned/doc.go
generated
vendored
@@ -1,4 +0,0 @@
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package versioned
|
||||
@@ -5,13 +5,12 @@ package fake
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
operatorv1 "open-cluster-management.io/api/operator/v1"
|
||||
v1 "open-cluster-management.io/api/operator/v1"
|
||||
)
|
||||
|
||||
// FakeClusterManagers implements ClusterManagerInterface
|
||||
@@ -19,24 +18,24 @@ type FakeClusterManagers struct {
|
||||
Fake *FakeOperatorV1
|
||||
}
|
||||
|
||||
var clustermanagersResource = schema.GroupVersionResource{Group: "operator.open-cluster-management.io", Version: "v1", Resource: "clustermanagers"}
|
||||
var clustermanagersResource = v1.SchemeGroupVersion.WithResource("clustermanagers")
|
||||
|
||||
var clustermanagersKind = schema.GroupVersionKind{Group: "operator.open-cluster-management.io", Version: "v1", Kind: "ClusterManager"}
|
||||
var clustermanagersKind = v1.SchemeGroupVersion.WithKind("ClusterManager")
|
||||
|
||||
// Get takes name of the clusterManager, and returns the corresponding clusterManager object, and an error if there is any.
|
||||
func (c *FakeClusterManagers) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.ClusterManager, err error) {
|
||||
func (c *FakeClusterManagers) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ClusterManager, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(clustermanagersResource, name), &operatorv1.ClusterManager{})
|
||||
Invokes(testing.NewRootGetAction(clustermanagersResource, name), &v1.ClusterManager{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.ClusterManager), err
|
||||
return obj.(*v1.ClusterManager), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ClusterManagers that match those selectors.
|
||||
func (c *FakeClusterManagers) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.ClusterManagerList, err error) {
|
||||
func (c *FakeClusterManagers) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ClusterManagerList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(clustermanagersResource, clustermanagersKind, opts), &operatorv1.ClusterManagerList{})
|
||||
Invokes(testing.NewRootListAction(clustermanagersResource, clustermanagersKind, opts), &v1.ClusterManagerList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -45,8 +44,8 @@ func (c *FakeClusterManagers) List(ctx context.Context, opts v1.ListOptions) (re
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &operatorv1.ClusterManagerList{ListMeta: obj.(*operatorv1.ClusterManagerList).ListMeta}
|
||||
for _, item := range obj.(*operatorv1.ClusterManagerList).Items {
|
||||
list := &v1.ClusterManagerList{ListMeta: obj.(*v1.ClusterManagerList).ListMeta}
|
||||
for _, item := range obj.(*v1.ClusterManagerList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -55,63 +54,63 @@ func (c *FakeClusterManagers) List(ctx context.Context, opts v1.ListOptions) (re
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested clusterManagers.
|
||||
func (c *FakeClusterManagers) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeClusterManagers) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(clustermanagersResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a clusterManager and creates it. Returns the server's representation of the clusterManager, and an error, if there is any.
|
||||
func (c *FakeClusterManagers) Create(ctx context.Context, clusterManager *operatorv1.ClusterManager, opts v1.CreateOptions) (result *operatorv1.ClusterManager, err error) {
|
||||
func (c *FakeClusterManagers) Create(ctx context.Context, clusterManager *v1.ClusterManager, opts metav1.CreateOptions) (result *v1.ClusterManager, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(clustermanagersResource, clusterManager), &operatorv1.ClusterManager{})
|
||||
Invokes(testing.NewRootCreateAction(clustermanagersResource, clusterManager), &v1.ClusterManager{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.ClusterManager), err
|
||||
return obj.(*v1.ClusterManager), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a clusterManager and updates it. Returns the server's representation of the clusterManager, and an error, if there is any.
|
||||
func (c *FakeClusterManagers) Update(ctx context.Context, clusterManager *operatorv1.ClusterManager, opts v1.UpdateOptions) (result *operatorv1.ClusterManager, err error) {
|
||||
func (c *FakeClusterManagers) Update(ctx context.Context, clusterManager *v1.ClusterManager, opts metav1.UpdateOptions) (result *v1.ClusterManager, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(clustermanagersResource, clusterManager), &operatorv1.ClusterManager{})
|
||||
Invokes(testing.NewRootUpdateAction(clustermanagersResource, clusterManager), &v1.ClusterManager{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.ClusterManager), err
|
||||
return obj.(*v1.ClusterManager), 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 *FakeClusterManagers) UpdateStatus(ctx context.Context, clusterManager *operatorv1.ClusterManager, opts v1.UpdateOptions) (*operatorv1.ClusterManager, error) {
|
||||
func (c *FakeClusterManagers) UpdateStatus(ctx context.Context, clusterManager *v1.ClusterManager, opts metav1.UpdateOptions) (*v1.ClusterManager, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(clustermanagersResource, "status", clusterManager), &operatorv1.ClusterManager{})
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(clustermanagersResource, "status", clusterManager), &v1.ClusterManager{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.ClusterManager), err
|
||||
return obj.(*v1.ClusterManager), err
|
||||
}
|
||||
|
||||
// Delete takes name of the clusterManager and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeClusterManagers) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeClusterManagers) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(clustermanagersResource, name, opts), &operatorv1.ClusterManager{})
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(clustermanagersResource, name, opts), &v1.ClusterManager{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeClusterManagers) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeClusterManagers) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(clustermanagersResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &operatorv1.ClusterManagerList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.ClusterManagerList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched clusterManager.
|
||||
func (c *FakeClusterManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.ClusterManager, err error) {
|
||||
func (c *FakeClusterManagers) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ClusterManager, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(clustermanagersResource, name, pt, data, subresources...), &operatorv1.ClusterManager{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(clustermanagersResource, name, pt, data, subresources...), &v1.ClusterManager{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.ClusterManager), err
|
||||
return obj.(*v1.ClusterManager), err
|
||||
}
|
||||
|
||||
@@ -5,13 +5,12 @@ package fake
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
operatorv1 "open-cluster-management.io/api/operator/v1"
|
||||
v1 "open-cluster-management.io/api/operator/v1"
|
||||
)
|
||||
|
||||
// FakeKlusterlets implements KlusterletInterface
|
||||
@@ -19,24 +18,24 @@ type FakeKlusterlets struct {
|
||||
Fake *FakeOperatorV1
|
||||
}
|
||||
|
||||
var klusterletsResource = schema.GroupVersionResource{Group: "operator.open-cluster-management.io", Version: "v1", Resource: "klusterlets"}
|
||||
var klusterletsResource = v1.SchemeGroupVersion.WithResource("klusterlets")
|
||||
|
||||
var klusterletsKind = schema.GroupVersionKind{Group: "operator.open-cluster-management.io", Version: "v1", Kind: "Klusterlet"}
|
||||
var klusterletsKind = v1.SchemeGroupVersion.WithKind("Klusterlet")
|
||||
|
||||
// Get takes name of the klusterlet, and returns the corresponding klusterlet object, and an error if there is any.
|
||||
func (c *FakeKlusterlets) Get(ctx context.Context, name string, options v1.GetOptions) (result *operatorv1.Klusterlet, err error) {
|
||||
func (c *FakeKlusterlets) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Klusterlet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(klusterletsResource, name), &operatorv1.Klusterlet{})
|
||||
Invokes(testing.NewRootGetAction(klusterletsResource, name), &v1.Klusterlet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.Klusterlet), err
|
||||
return obj.(*v1.Klusterlet), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Klusterlets that match those selectors.
|
||||
func (c *FakeKlusterlets) List(ctx context.Context, opts v1.ListOptions) (result *operatorv1.KlusterletList, err error) {
|
||||
func (c *FakeKlusterlets) List(ctx context.Context, opts metav1.ListOptions) (result *v1.KlusterletList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(klusterletsResource, klusterletsKind, opts), &operatorv1.KlusterletList{})
|
||||
Invokes(testing.NewRootListAction(klusterletsResource, klusterletsKind, opts), &v1.KlusterletList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -45,8 +44,8 @@ func (c *FakeKlusterlets) List(ctx context.Context, opts v1.ListOptions) (result
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &operatorv1.KlusterletList{ListMeta: obj.(*operatorv1.KlusterletList).ListMeta}
|
||||
for _, item := range obj.(*operatorv1.KlusterletList).Items {
|
||||
list := &v1.KlusterletList{ListMeta: obj.(*v1.KlusterletList).ListMeta}
|
||||
for _, item := range obj.(*v1.KlusterletList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -55,63 +54,63 @@ func (c *FakeKlusterlets) List(ctx context.Context, opts v1.ListOptions) (result
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested klusterlets.
|
||||
func (c *FakeKlusterlets) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeKlusterlets) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(klusterletsResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a klusterlet and creates it. Returns the server's representation of the klusterlet, and an error, if there is any.
|
||||
func (c *FakeKlusterlets) Create(ctx context.Context, klusterlet *operatorv1.Klusterlet, opts v1.CreateOptions) (result *operatorv1.Klusterlet, err error) {
|
||||
func (c *FakeKlusterlets) Create(ctx context.Context, klusterlet *v1.Klusterlet, opts metav1.CreateOptions) (result *v1.Klusterlet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(klusterletsResource, klusterlet), &operatorv1.Klusterlet{})
|
||||
Invokes(testing.NewRootCreateAction(klusterletsResource, klusterlet), &v1.Klusterlet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.Klusterlet), err
|
||||
return obj.(*v1.Klusterlet), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a klusterlet and updates it. Returns the server's representation of the klusterlet, and an error, if there is any.
|
||||
func (c *FakeKlusterlets) Update(ctx context.Context, klusterlet *operatorv1.Klusterlet, opts v1.UpdateOptions) (result *operatorv1.Klusterlet, err error) {
|
||||
func (c *FakeKlusterlets) Update(ctx context.Context, klusterlet *v1.Klusterlet, opts metav1.UpdateOptions) (result *v1.Klusterlet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(klusterletsResource, klusterlet), &operatorv1.Klusterlet{})
|
||||
Invokes(testing.NewRootUpdateAction(klusterletsResource, klusterlet), &v1.Klusterlet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.Klusterlet), err
|
||||
return obj.(*v1.Klusterlet), 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 *FakeKlusterlets) UpdateStatus(ctx context.Context, klusterlet *operatorv1.Klusterlet, opts v1.UpdateOptions) (*operatorv1.Klusterlet, error) {
|
||||
func (c *FakeKlusterlets) UpdateStatus(ctx context.Context, klusterlet *v1.Klusterlet, opts metav1.UpdateOptions) (*v1.Klusterlet, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(klusterletsResource, "status", klusterlet), &operatorv1.Klusterlet{})
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(klusterletsResource, "status", klusterlet), &v1.Klusterlet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.Klusterlet), err
|
||||
return obj.(*v1.Klusterlet), err
|
||||
}
|
||||
|
||||
// Delete takes name of the klusterlet and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeKlusterlets) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeKlusterlets) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(klusterletsResource, name, opts), &operatorv1.Klusterlet{})
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(klusterletsResource, name, opts), &v1.Klusterlet{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeKlusterlets) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeKlusterlets) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(klusterletsResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &operatorv1.KlusterletList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.KlusterletList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched klusterlet.
|
||||
func (c *FakeKlusterlets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1.Klusterlet, err error) {
|
||||
func (c *FakeKlusterlets) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Klusterlet, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(klusterletsResource, name, pt, data, subresources...), &operatorv1.Klusterlet{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(klusterletsResource, name, pt, data, subresources...), &v1.Klusterlet{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*operatorv1.Klusterlet), err
|
||||
return obj.(*v1.Klusterlet), err
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref
|
||||
return res
|
||||
}
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
@@ -223,7 +223,7 @@ type SharedInformerFactory interface {
|
||||
// ForResource gives generic access to a shared informer of the matching type.
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer
|
||||
|
||||
|
||||
4
vendor/open-cluster-management.io/api/client/work/clientset/versioned/doc.go
generated
vendored
4
vendor/open-cluster-management.io/api/client/work/clientset/versioned/doc.go
generated
vendored
@@ -1,4 +0,0 @@
|
||||
// Code generated by client-gen. DO NOT EDIT.
|
||||
|
||||
// This package has the automatically generated clientset.
|
||||
package versioned
|
||||
@@ -5,13 +5,12 @@ package fake
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
workv1 "open-cluster-management.io/api/work/v1"
|
||||
v1 "open-cluster-management.io/api/work/v1"
|
||||
)
|
||||
|
||||
// FakeAppliedManifestWorks implements AppliedManifestWorkInterface
|
||||
@@ -19,24 +18,24 @@ type FakeAppliedManifestWorks struct {
|
||||
Fake *FakeWorkV1
|
||||
}
|
||||
|
||||
var appliedmanifestworksResource = schema.GroupVersionResource{Group: "work.open-cluster-management.io", Version: "v1", Resource: "appliedmanifestworks"}
|
||||
var appliedmanifestworksResource = v1.SchemeGroupVersion.WithResource("appliedmanifestworks")
|
||||
|
||||
var appliedmanifestworksKind = schema.GroupVersionKind{Group: "work.open-cluster-management.io", Version: "v1", Kind: "AppliedManifestWork"}
|
||||
var appliedmanifestworksKind = v1.SchemeGroupVersion.WithKind("AppliedManifestWork")
|
||||
|
||||
// Get takes name of the appliedManifestWork, and returns the corresponding appliedManifestWork object, and an error if there is any.
|
||||
func (c *FakeAppliedManifestWorks) Get(ctx context.Context, name string, options v1.GetOptions) (result *workv1.AppliedManifestWork, err error) {
|
||||
func (c *FakeAppliedManifestWorks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.AppliedManifestWork, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetAction(appliedmanifestworksResource, name), &workv1.AppliedManifestWork{})
|
||||
Invokes(testing.NewRootGetAction(appliedmanifestworksResource, name), &v1.AppliedManifestWork{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.AppliedManifestWork), err
|
||||
return obj.(*v1.AppliedManifestWork), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of AppliedManifestWorks that match those selectors.
|
||||
func (c *FakeAppliedManifestWorks) List(ctx context.Context, opts v1.ListOptions) (result *workv1.AppliedManifestWorkList, err error) {
|
||||
func (c *FakeAppliedManifestWorks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.AppliedManifestWorkList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListAction(appliedmanifestworksResource, appliedmanifestworksKind, opts), &workv1.AppliedManifestWorkList{})
|
||||
Invokes(testing.NewRootListAction(appliedmanifestworksResource, appliedmanifestworksKind, opts), &v1.AppliedManifestWorkList{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -45,8 +44,8 @@ func (c *FakeAppliedManifestWorks) List(ctx context.Context, opts v1.ListOptions
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &workv1.AppliedManifestWorkList{ListMeta: obj.(*workv1.AppliedManifestWorkList).ListMeta}
|
||||
for _, item := range obj.(*workv1.AppliedManifestWorkList).Items {
|
||||
list := &v1.AppliedManifestWorkList{ListMeta: obj.(*v1.AppliedManifestWorkList).ListMeta}
|
||||
for _, item := range obj.(*v1.AppliedManifestWorkList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -55,63 +54,63 @@ func (c *FakeAppliedManifestWorks) List(ctx context.Context, opts v1.ListOptions
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested appliedManifestWorks.
|
||||
func (c *FakeAppliedManifestWorks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeAppliedManifestWorks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchAction(appliedmanifestworksResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a appliedManifestWork and creates it. Returns the server's representation of the appliedManifestWork, and an error, if there is any.
|
||||
func (c *FakeAppliedManifestWorks) Create(ctx context.Context, appliedManifestWork *workv1.AppliedManifestWork, opts v1.CreateOptions) (result *workv1.AppliedManifestWork, err error) {
|
||||
func (c *FakeAppliedManifestWorks) Create(ctx context.Context, appliedManifestWork *v1.AppliedManifestWork, opts metav1.CreateOptions) (result *v1.AppliedManifestWork, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateAction(appliedmanifestworksResource, appliedManifestWork), &workv1.AppliedManifestWork{})
|
||||
Invokes(testing.NewRootCreateAction(appliedmanifestworksResource, appliedManifestWork), &v1.AppliedManifestWork{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.AppliedManifestWork), err
|
||||
return obj.(*v1.AppliedManifestWork), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a appliedManifestWork and updates it. Returns the server's representation of the appliedManifestWork, and an error, if there is any.
|
||||
func (c *FakeAppliedManifestWorks) Update(ctx context.Context, appliedManifestWork *workv1.AppliedManifestWork, opts v1.UpdateOptions) (result *workv1.AppliedManifestWork, err error) {
|
||||
func (c *FakeAppliedManifestWorks) Update(ctx context.Context, appliedManifestWork *v1.AppliedManifestWork, opts metav1.UpdateOptions) (result *v1.AppliedManifestWork, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateAction(appliedmanifestworksResource, appliedManifestWork), &workv1.AppliedManifestWork{})
|
||||
Invokes(testing.NewRootUpdateAction(appliedmanifestworksResource, appliedManifestWork), &v1.AppliedManifestWork{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.AppliedManifestWork), err
|
||||
return obj.(*v1.AppliedManifestWork), 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 *FakeAppliedManifestWorks) UpdateStatus(ctx context.Context, appliedManifestWork *workv1.AppliedManifestWork, opts v1.UpdateOptions) (*workv1.AppliedManifestWork, error) {
|
||||
func (c *FakeAppliedManifestWorks) UpdateStatus(ctx context.Context, appliedManifestWork *v1.AppliedManifestWork, opts metav1.UpdateOptions) (*v1.AppliedManifestWork, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(appliedmanifestworksResource, "status", appliedManifestWork), &workv1.AppliedManifestWork{})
|
||||
Invokes(testing.NewRootUpdateSubresourceAction(appliedmanifestworksResource, "status", appliedManifestWork), &v1.AppliedManifestWork{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.AppliedManifestWork), err
|
||||
return obj.(*v1.AppliedManifestWork), err
|
||||
}
|
||||
|
||||
// Delete takes name of the appliedManifestWork and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeAppliedManifestWorks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeAppliedManifestWorks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(appliedmanifestworksResource, name, opts), &workv1.AppliedManifestWork{})
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(appliedmanifestworksResource, name, opts), &v1.AppliedManifestWork{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeAppliedManifestWorks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeAppliedManifestWorks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionAction(appliedmanifestworksResource, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &workv1.AppliedManifestWorkList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.AppliedManifestWorkList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched appliedManifestWork.
|
||||
func (c *FakeAppliedManifestWorks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *workv1.AppliedManifestWork, err error) {
|
||||
func (c *FakeAppliedManifestWorks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.AppliedManifestWork, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceAction(appliedmanifestworksResource, name, pt, data, subresources...), &workv1.AppliedManifestWork{})
|
||||
Invokes(testing.NewRootPatchSubresourceAction(appliedmanifestworksResource, name, pt, data, subresources...), &v1.AppliedManifestWork{})
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.AppliedManifestWork), err
|
||||
return obj.(*v1.AppliedManifestWork), err
|
||||
}
|
||||
|
||||
@@ -5,13 +5,12 @@ package fake
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
workv1 "open-cluster-management.io/api/work/v1"
|
||||
v1 "open-cluster-management.io/api/work/v1"
|
||||
)
|
||||
|
||||
// FakeManifestWorks implements ManifestWorkInterface
|
||||
@@ -20,25 +19,25 @@ type FakeManifestWorks struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var manifestworksResource = schema.GroupVersionResource{Group: "work.open-cluster-management.io", Version: "v1", Resource: "manifestworks"}
|
||||
var manifestworksResource = v1.SchemeGroupVersion.WithResource("manifestworks")
|
||||
|
||||
var manifestworksKind = schema.GroupVersionKind{Group: "work.open-cluster-management.io", Version: "v1", Kind: "ManifestWork"}
|
||||
var manifestworksKind = v1.SchemeGroupVersion.WithKind("ManifestWork")
|
||||
|
||||
// Get takes name of the manifestWork, and returns the corresponding manifestWork object, and an error if there is any.
|
||||
func (c *FakeManifestWorks) Get(ctx context.Context, name string, options v1.GetOptions) (result *workv1.ManifestWork, err error) {
|
||||
func (c *FakeManifestWorks) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.ManifestWork, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetAction(manifestworksResource, c.ns, name), &workv1.ManifestWork{})
|
||||
Invokes(testing.NewGetAction(manifestworksResource, c.ns, name), &v1.ManifestWork{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.ManifestWork), err
|
||||
return obj.(*v1.ManifestWork), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ManifestWorks that match those selectors.
|
||||
func (c *FakeManifestWorks) List(ctx context.Context, opts v1.ListOptions) (result *workv1.ManifestWorkList, err error) {
|
||||
func (c *FakeManifestWorks) List(ctx context.Context, opts metav1.ListOptions) (result *v1.ManifestWorkList, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListAction(manifestworksResource, manifestworksKind, c.ns, opts), &workv1.ManifestWorkList{})
|
||||
Invokes(testing.NewListAction(manifestworksResource, manifestworksKind, c.ns, opts), &v1.ManifestWorkList{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
@@ -48,8 +47,8 @@ func (c *FakeManifestWorks) List(ctx context.Context, opts v1.ListOptions) (resu
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &workv1.ManifestWorkList{ListMeta: obj.(*workv1.ManifestWorkList).ListMeta}
|
||||
for _, item := range obj.(*workv1.ManifestWorkList).Items {
|
||||
list := &v1.ManifestWorkList{ListMeta: obj.(*v1.ManifestWorkList).ListMeta}
|
||||
for _, item := range obj.(*v1.ManifestWorkList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
@@ -58,69 +57,69 @@ func (c *FakeManifestWorks) List(ctx context.Context, opts v1.ListOptions) (resu
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested manifestWorks.
|
||||
func (c *FakeManifestWorks) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
func (c *FakeManifestWorks) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchAction(manifestworksResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a manifestWork and creates it. Returns the server's representation of the manifestWork, and an error, if there is any.
|
||||
func (c *FakeManifestWorks) Create(ctx context.Context, manifestWork *workv1.ManifestWork, opts v1.CreateOptions) (result *workv1.ManifestWork, err error) {
|
||||
func (c *FakeManifestWorks) Create(ctx context.Context, manifestWork *v1.ManifestWork, opts metav1.CreateOptions) (result *v1.ManifestWork, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateAction(manifestworksResource, c.ns, manifestWork), &workv1.ManifestWork{})
|
||||
Invokes(testing.NewCreateAction(manifestworksResource, c.ns, manifestWork), &v1.ManifestWork{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.ManifestWork), err
|
||||
return obj.(*v1.ManifestWork), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a manifestWork and updates it. Returns the server's representation of the manifestWork, and an error, if there is any.
|
||||
func (c *FakeManifestWorks) Update(ctx context.Context, manifestWork *workv1.ManifestWork, opts v1.UpdateOptions) (result *workv1.ManifestWork, err error) {
|
||||
func (c *FakeManifestWorks) Update(ctx context.Context, manifestWork *v1.ManifestWork, opts metav1.UpdateOptions) (result *v1.ManifestWork, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateAction(manifestworksResource, c.ns, manifestWork), &workv1.ManifestWork{})
|
||||
Invokes(testing.NewUpdateAction(manifestworksResource, c.ns, manifestWork), &v1.ManifestWork{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.ManifestWork), err
|
||||
return obj.(*v1.ManifestWork), 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 *FakeManifestWorks) UpdateStatus(ctx context.Context, manifestWork *workv1.ManifestWork, opts v1.UpdateOptions) (*workv1.ManifestWork, error) {
|
||||
func (c *FakeManifestWorks) UpdateStatus(ctx context.Context, manifestWork *v1.ManifestWork, opts metav1.UpdateOptions) (*v1.ManifestWork, error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceAction(manifestworksResource, "status", c.ns, manifestWork), &workv1.ManifestWork{})
|
||||
Invokes(testing.NewUpdateSubresourceAction(manifestworksResource, "status", c.ns, manifestWork), &v1.ManifestWork{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.ManifestWork), err
|
||||
return obj.(*v1.ManifestWork), err
|
||||
}
|
||||
|
||||
// Delete takes name of the manifestWork and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeManifestWorks) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
func (c *FakeManifestWorks) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(manifestworksResource, c.ns, name, opts), &workv1.ManifestWork{})
|
||||
Invokes(testing.NewDeleteActionWithOptions(manifestworksResource, c.ns, name, opts), &v1.ManifestWork{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeManifestWorks) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
func (c *FakeManifestWorks) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionAction(manifestworksResource, c.ns, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &workv1.ManifestWorkList{})
|
||||
_, err := c.Fake.Invokes(action, &v1.ManifestWorkList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched manifestWork.
|
||||
func (c *FakeManifestWorks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *workv1.ManifestWork, err error) {
|
||||
func (c *FakeManifestWorks) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.ManifestWork, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(manifestworksResource, c.ns, name, pt, data, subresources...), &workv1.ManifestWork{})
|
||||
Invokes(testing.NewPatchSubresourceAction(manifestworksResource, c.ns, name, pt, data, subresources...), &v1.ManifestWork{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
}
|
||||
return obj.(*workv1.ManifestWork), err
|
||||
return obj.(*v1.ManifestWork), err
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
@@ -20,9 +19,9 @@ type FakeManifestWorkReplicaSets struct {
|
||||
ns string
|
||||
}
|
||||
|
||||
var manifestworkreplicasetsResource = schema.GroupVersionResource{Group: "work.open-cluster-management.io", Version: "v1alpha1", Resource: "manifestworkreplicasets"}
|
||||
var manifestworkreplicasetsResource = v1alpha1.SchemeGroupVersion.WithResource("manifestworkreplicasets")
|
||||
|
||||
var manifestworkreplicasetsKind = schema.GroupVersionKind{Group: "work.open-cluster-management.io", Version: "v1alpha1", Kind: "ManifestWorkReplicaSet"}
|
||||
var manifestworkreplicasetsKind = v1alpha1.SchemeGroupVersion.WithKind("ManifestWorkReplicaSet")
|
||||
|
||||
// Get takes name of the manifestWorkReplicaSet, and returns the corresponding manifestWorkReplicaSet object, and an error if there is any.
|
||||
func (c *FakeManifestWorkReplicaSets) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ManifestWorkReplicaSet, err error) {
|
||||
|
||||
@@ -150,7 +150,7 @@ func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[ref
|
||||
return res
|
||||
}
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer {
|
||||
f.lock.Lock()
|
||||
@@ -223,7 +223,7 @@ type SharedInformerFactory interface {
|
||||
// ForResource gives generic access to a shared informer of the matching type.
|
||||
ForResource(resource schema.GroupVersionResource) (GenericInformer, error)
|
||||
|
||||
// InternalInformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// InformerFor returns the SharedIndexInformer for obj using an internal
|
||||
// client.
|
||||
InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer
|
||||
|
||||
|
||||
2
vendor/open-cluster-management.io/api/cluster/v1/doc.go
generated
vendored
2
vendor/open-cluster-management.io/api/cluster/v1/doc.go
generated
vendored
@@ -1,7 +1,5 @@
|
||||
// Package v1 contains API Schema definitions for the cluster v1 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=open-cluster-management.io/api/cluster
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
|
||||
2
vendor/open-cluster-management.io/api/cluster/v1alpha1/doc.go
generated
vendored
2
vendor/open-cluster-management.io/api/cluster/v1alpha1/doc.go
generated
vendored
@@ -1,7 +1,5 @@
|
||||
// Package v1alpha1 contains API Schema definitions for the cluster v1alpha1 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=open-cluster-management.io/api/cluster
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
|
||||
2
vendor/open-cluster-management.io/api/cluster/v1beta1/doc.go
generated
vendored
2
vendor/open-cluster-management.io/api/cluster/v1beta1/doc.go
generated
vendored
@@ -1,7 +1,5 @@
|
||||
// Package v1beta1 contains API Schema definitions for the cluster v1beta1 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=open-cluster-management.io/api/cluster
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
|
||||
2
vendor/open-cluster-management.io/api/cluster/v1beta2/doc.go
generated
vendored
2
vendor/open-cluster-management.io/api/cluster/v1beta2/doc.go
generated
vendored
@@ -1,7 +1,5 @@
|
||||
// Package v1beta2 contains API Schema definitions for the cluster v1beta2 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=open-cluster-management.io/api/cluster
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
|
||||
@@ -142,6 +142,16 @@ spec:
|
||||
enum:
|
||||
- Enable
|
||||
- Disable
|
||||
kubeAPIBurst:
|
||||
description: 'KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver of hub cluster from the spoke cluster. If it is set empty, use the default value: 100'
|
||||
type: integer
|
||||
format: int32
|
||||
default: 100
|
||||
kubeAPIQPS:
|
||||
description: 'KubeAPIQPS indicates the maximum QPS while talking with apiserver of hub cluster from the spoke cluster. If it is set empty, use the default value: 50'
|
||||
type: integer
|
||||
format: int32
|
||||
default: 50
|
||||
registrationImagePullSpec:
|
||||
description: RegistrationImagePullSpec represents the desired image configuration of registration agent. quay.io/open-cluster-management.io/registration:latest will be used if unspecified.
|
||||
type: string
|
||||
@@ -177,6 +187,16 @@ spec:
|
||||
enum:
|
||||
- Enable
|
||||
- Disable
|
||||
kubeAPIBurst:
|
||||
description: 'KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver of hub cluster from the spoke cluster. If it is set empty, use the default value: 100'
|
||||
type: integer
|
||||
format: int32
|
||||
default: 100
|
||||
kubeAPIQPS:
|
||||
description: 'KubeAPIQPS indicates the maximum QPS while talking with apiserver of hub cluster from the spoke cluster. If it is set empty, use the default value: 50'
|
||||
type: integer
|
||||
format: int32
|
||||
default: 50
|
||||
workImagePullSpec:
|
||||
description: WorkImagePullSpec represents the desired image configuration of work agent. quay.io/open-cluster-management.io/work:latest will be used if unspecified.
|
||||
type: string
|
||||
|
||||
@@ -223,6 +223,20 @@ spec:
|
||||
- feature
|
||||
type: object
|
||||
type: array
|
||||
kubeAPIBurst:
|
||||
default: 100
|
||||
description: 'KubeAPIBurst indicates the maximum burst of the
|
||||
throttle while talking with apiserver of hub cluster from the
|
||||
spoke cluster. If it is set empty, use the default value: 100'
|
||||
format: int32
|
||||
type: integer
|
||||
kubeAPIQPS:
|
||||
default: 50
|
||||
description: 'KubeAPIQPS indicates the maximum QPS while talking
|
||||
with apiserver of hub cluster from the spoke cluster. If it
|
||||
is set empty, use the default value: 50'
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
registrationImagePullSpec:
|
||||
description: RegistrationImagePullSpec represents the desired image
|
||||
@@ -274,6 +288,20 @@ spec:
|
||||
- feature
|
||||
type: object
|
||||
type: array
|
||||
kubeAPIBurst:
|
||||
default: 100
|
||||
description: 'KubeAPIBurst indicates the maximum burst of the
|
||||
throttle while talking with apiserver of hub cluster from the
|
||||
spoke cluster. If it is set empty, use the default value: 100'
|
||||
format: int32
|
||||
type: integer
|
||||
kubeAPIQPS:
|
||||
default: 50
|
||||
description: 'KubeAPIQPS indicates the maximum QPS while talking
|
||||
with apiserver of hub cluster from the spoke cluster. If it
|
||||
is set empty, use the default value: 50'
|
||||
format: int32
|
||||
type: integer
|
||||
type: object
|
||||
workImagePullSpec:
|
||||
description: WorkImagePullSpec represents the desired image configuration
|
||||
|
||||
2
vendor/open-cluster-management.io/api/operator/v1/doc.go
generated
vendored
2
vendor/open-cluster-management.io/api/operator/v1/doc.go
generated
vendored
@@ -1,7 +1,5 @@
|
||||
// Package v1 contains API Schema definitions for the operator v1 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=open-cluster-management.io/api/operator
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
|
||||
2
vendor/open-cluster-management.io/api/operator/v1/types_clustermanager.go
generated
vendored
2
vendor/open-cluster-management.io/api/operator/v1/types_clustermanager.go
generated
vendored
@@ -175,7 +175,6 @@ type WebhookConfiguration struct {
|
||||
|
||||
// Port represents the port of a webhook-server. The default value of Port is 443.
|
||||
// +optional
|
||||
// +default=443
|
||||
// +kubebuilder:default=443
|
||||
// +kubebuilder:validation:Maximum=65535
|
||||
Port int32 `json:"port,omitempty"`
|
||||
@@ -190,7 +189,6 @@ type ClusterManagerDeployOption struct {
|
||||
// of hub-cluster with cluster-admin permission).
|
||||
// Note: Do not modify the Mode field once it's applied.
|
||||
// +required
|
||||
// +default=Default
|
||||
// +kubebuilder:validation:Required
|
||||
// +kubebuilder:default=Default
|
||||
// +kubebuilder:validation:Enum=Default;Hosted
|
||||
|
||||
38
vendor/open-cluster-management.io/api/operator/v1/types_klusterlet.go
generated
vendored
38
vendor/open-cluster-management.io/api/operator/v1/types_klusterlet.go
generated
vendored
@@ -80,7 +80,7 @@ type KlusterletSpec struct {
|
||||
|
||||
// WorkConfiguration contains the configuration of work
|
||||
// +optional
|
||||
WorkConfiguration *WorkConfiguration `json:"workConfiguration,omitempty"`
|
||||
WorkConfiguration *WorkAgentConfiguration `json:"workConfiguration,omitempty"`
|
||||
|
||||
// HubApiServerHostAlias contains the host alias for hub api server.
|
||||
// registration-agent and work-agent will use it to communicate with hub api server.
|
||||
@@ -157,6 +157,42 @@ type RegistrationConfiguration struct {
|
||||
// ManagedCluster when creating only, other actors can update it afterwards.
|
||||
// +optional
|
||||
ClusterAnnotations map[string]string `json:"clusterAnnotations,omitempty"`
|
||||
|
||||
// KubeAPIQPS indicates the maximum QPS while talking with apiserver of hub cluster from the spoke cluster.
|
||||
// If it is set empty, use the default value: 50
|
||||
// +optional
|
||||
// +kubebuilder:default:=50
|
||||
KubeAPIQPS int32 `json:"kubeAPIQPS,omitempty"`
|
||||
|
||||
// KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver of hub cluster from the spoke cluster.
|
||||
// If it is set empty, use the default value: 100
|
||||
// +optional
|
||||
// +kubebuilder:default:=100
|
||||
KubeAPIBurst int32 `json:"kubeAPIBurst,omitempty"`
|
||||
}
|
||||
|
||||
type WorkAgentConfiguration struct {
|
||||
// FeatureGates represents the list of feature gates for work
|
||||
// If it is set empty, default feature gates will be used.
|
||||
// If it is set, featuregate/Foo is an example of one item in FeatureGates:
|
||||
// 1. If featuregate/Foo does not exist, registration-operator will discard it
|
||||
// 2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]
|
||||
// 3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,
|
||||
// he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
|
||||
// +optional
|
||||
FeatureGates []FeatureGate `json:"featureGates,omitempty"`
|
||||
|
||||
// KubeAPIQPS indicates the maximum QPS while talking with apiserver of hub cluster from the spoke cluster.
|
||||
// If it is set empty, use the default value: 50
|
||||
// +optional
|
||||
// +kubebuilder:default:=50
|
||||
KubeAPIQPS int32 `json:"kubeAPIQPS,omitempty"`
|
||||
|
||||
// KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver of hub cluster from the spoke cluster.
|
||||
// If it is set empty, use the default value: 100
|
||||
// +optional
|
||||
// +kubebuilder:default:=100
|
||||
KubeAPIBurst int32 `json:"kubeAPIBurst,omitempty"`
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
23
vendor/open-cluster-management.io/api/operator/v1/zz_generated.deepcopy.go
generated
vendored
23
vendor/open-cluster-management.io/api/operator/v1/zz_generated.deepcopy.go
generated
vendored
@@ -342,7 +342,7 @@ func (in *KlusterletSpec) DeepCopyInto(out *KlusterletSpec) {
|
||||
}
|
||||
if in.WorkConfiguration != nil {
|
||||
in, out := &in.WorkConfiguration, &out.WorkConfiguration
|
||||
*out = new(WorkConfiguration)
|
||||
*out = new(WorkAgentConfiguration)
|
||||
(*in).DeepCopyInto(*out)
|
||||
}
|
||||
if in.HubApiServerHostAlias != nil {
|
||||
@@ -554,6 +554,27 @@ func (in *WebhookConfiguration) DeepCopy() *WebhookConfiguration {
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkAgentConfiguration) DeepCopyInto(out *WorkAgentConfiguration) {
|
||||
*out = *in
|
||||
if in.FeatureGates != nil {
|
||||
in, out := &in.FeatureGates, &out.FeatureGates
|
||||
*out = make([]FeatureGate, len(*in))
|
||||
copy(*out, *in)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkAgentConfiguration.
|
||||
func (in *WorkAgentConfiguration) DeepCopy() *WorkAgentConfiguration {
|
||||
if in == nil {
|
||||
return nil
|
||||
}
|
||||
out := new(WorkAgentConfiguration)
|
||||
in.DeepCopyInto(out)
|
||||
return out
|
||||
}
|
||||
|
||||
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
|
||||
func (in *WorkConfiguration) DeepCopyInto(out *WorkConfiguration) {
|
||||
*out = *in
|
||||
|
||||
12
vendor/open-cluster-management.io/api/operator/v1/zz_generated.swagger_doc_generated.go
generated
vendored
12
vendor/open-cluster-management.io/api/operator/v1/zz_generated.swagger_doc_generated.go
generated
vendored
@@ -236,6 +236,8 @@ var map_RegistrationConfiguration = map[string]string{
|
||||
"clientCertExpirationSeconds": "clientCertExpirationSeconds represents the seconds of a client certificate to expire. If it is not set or 0, the default duration seconds will be set by the hub cluster. If the value is larger than the max signing duration seconds set on the hub cluster, the max signing duration seconds will be set.",
|
||||
"featureGates": "FeatureGates represents the list of feature gates for registration If it is set empty, default feature gates will be used. If it is set, featuregate/Foo is an example of one item in FeatureGates:\n 1. If featuregate/Foo does not exist, registration-operator will discard it\n 2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]\n 3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,\n \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.",
|
||||
"clusterAnnotations": "ClusterAnnotations is annotations with the reserve prefix \"agent.open-cluster-management.io\" set on ManagedCluster when creating only, other actors can update it afterwards.",
|
||||
"kubeAPIQPS": "KubeAPIQPS indicates the maximum QPS while talking with apiserver of hub cluster from the spoke cluster. If it is set empty, use the default value: 50",
|
||||
"kubeAPIBurst": "KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver of hub cluster from the spoke cluster. If it is set empty, use the default value: 100",
|
||||
}
|
||||
|
||||
func (RegistrationConfiguration) SwaggerDoc() map[string]string {
|
||||
@@ -260,4 +262,14 @@ func (ServerURL) SwaggerDoc() map[string]string {
|
||||
return map_ServerURL
|
||||
}
|
||||
|
||||
var map_WorkAgentConfiguration = map[string]string{
|
||||
"featureGates": "FeatureGates represents the list of feature gates for work If it is set empty, default feature gates will be used. If it is set, featuregate/Foo is an example of one item in FeatureGates:\n 1. If featuregate/Foo does not exist, registration-operator will discard it\n 2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]\n 3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,\n \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.",
|
||||
"kubeAPIQPS": "KubeAPIQPS indicates the maximum QPS while talking with apiserver of hub cluster from the spoke cluster. If it is set empty, use the default value: 50",
|
||||
"kubeAPIBurst": "KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver of hub cluster from the spoke cluster. If it is set empty, use the default value: 100",
|
||||
}
|
||||
|
||||
func (WorkAgentConfiguration) SwaggerDoc() map[string]string {
|
||||
return map_WorkAgentConfiguration
|
||||
}
|
||||
|
||||
// AUTO-GENERATED FUNCTIONS END HERE
|
||||
|
||||
2
vendor/open-cluster-management.io/api/work/v1/doc.go
generated
vendored
2
vendor/open-cluster-management.io/api/work/v1/doc.go
generated
vendored
@@ -1,7 +1,5 @@
|
||||
// Package v1 contains API Schema definitions for the work v1 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=open-cluster-management.io/api/work
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
|
||||
2
vendor/open-cluster-management.io/api/work/v1alpha1/doc.go
generated
vendored
2
vendor/open-cluster-management.io/api/work/v1alpha1/doc.go
generated
vendored
@@ -1,7 +1,5 @@
|
||||
// Package v1 contains API Schema definitions for the work v1 API group
|
||||
// +k8s:deepcopy-gen=package,register
|
||||
// +k8s:conversion-gen=open-cluster-management.io/api/work
|
||||
// +k8s:defaulter-gen=TypeMeta
|
||||
// +k8s:openapi-gen=true
|
||||
|
||||
// +kubebuilder:validation:Optional
|
||||
|
||||
Reference in New Issue
Block a user