diff --git a/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml b/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml index 8e92beeb7..3879f1451 100644 --- a/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml +++ b/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml @@ -255,6 +255,21 @@ spec: - feature type: object type: array + importerConfiguration: + description: |- + ImporterConfiguration is the configuration to import managed clusters from the hub cluster. It applies only when + feature gate ClusterImporter is enabled. + properties: + agentImage: + description: |- + AgentImage is the image of the klusterlet agent. If it is not set, the default image + will be used with the corresponding version. + type: string + hubAPIServerURL: + description: HubAPIServer is the apiserver endpoint of the + hub cluster. + type: string + type: object type: object registrationImagePullSpec: default: quay.io/open-cluster-management/registration diff --git a/operator/v1/types_clustermanager.go b/operator/v1/types_clustermanager.go index 373f87f10..5d48755d3 100644 --- a/operator/v1/types_clustermanager.go +++ b/operator/v1/types_clustermanager.go @@ -108,6 +108,22 @@ type RegistrationHubConfiguration struct { // he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false. // +optional FeatureGates []FeatureGate `json:"featureGates,omitempty"` + + // ImporterConfiguration is the configuration to import managed clusters from the hub cluster. It applies only when + // feature gate ClusterImporter is enabled. + // +optional + ImporterConfiguration ImporterConfiguration `json:"importerConfiguration,omitempty"` +} + +type ImporterConfiguration struct { + // AgentImage is the image of the klusterlet agent. If it is not set, the default image + // will be used with the corresponding version. + // +optional + AgentImage string `json:"agentImage,omitempty"` + + // HubAPIServer is the apiserver endpoint of the hub cluster. + // +optional + HubAPIServerURL string `json:"hubAPIServerURL,omitempty"` } type WorkConfiguration struct { diff --git a/operator/v1/zz_generated.deepcopy.go b/operator/v1/zz_generated.deepcopy.go index 64a618ba5..bc4343ffb 100644 --- a/operator/v1/zz_generated.deepcopy.go +++ b/operator/v1/zz_generated.deepcopy.go @@ -284,6 +284,22 @@ func (in *HubApiServerHostAlias) DeepCopy() *HubApiServerHostAlias { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImporterConfiguration) DeepCopyInto(out *ImporterConfiguration) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImporterConfiguration. +func (in *ImporterConfiguration) DeepCopy() *ImporterConfiguration { + if in == nil { + return nil + } + out := new(ImporterConfiguration) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Klusterlet) DeepCopyInto(out *Klusterlet) { *out = *in @@ -570,6 +586,7 @@ func (in *RegistrationHubConfiguration) DeepCopyInto(out *RegistrationHubConfigu *out = make([]FeatureGate, len(*in)) copy(*out, *in) } + out.ImporterConfiguration = in.ImporterConfiguration return } diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index 5d63b9197..f45281d3b 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -112,6 +112,15 @@ func (HostedClusterManagerConfiguration) SwaggerDoc() map[string]string { return map_HostedClusterManagerConfiguration } +var map_ImporterConfiguration = map[string]string{ + "agentImage": "AgentImage is the image of the klusterlet agent. If it is not set, the default image will be used with the corresponding version.", + "hubAPIServerURL": "HubAPIServer is the apiserver endpoint of the hub cluster.", +} + +func (ImporterConfiguration) SwaggerDoc() map[string]string { + return map_ImporterConfiguration +} + var map_NodePlacement = map[string]string{ "": "NodePlacement describes node scheduling configuration for the pods.", "nodeSelector": "NodeSelector defines which Nodes the Pods are scheduled on. The default is an empty list.", @@ -123,8 +132,9 @@ func (NodePlacement) SwaggerDoc() map[string]string { } var map_RegistrationHubConfiguration = map[string]string{ - "autoApproveUsers": "AutoApproveUser represents a list of users that can auto approve CSR and accept client. If the credential of the bootstrap-hub-kubeconfig matches to the users, the cluster created by the bootstrap-hub-kubeconfig will be auto-registered into the hub cluster. This takes effect only when ManagedClusterAutoApproval feature gate is enabled.", - "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.", + "autoApproveUsers": "AutoApproveUser represents a list of users that can auto approve CSR and accept client. If the credential of the bootstrap-hub-kubeconfig matches to the users, the cluster created by the bootstrap-hub-kubeconfig will be auto-registered into the hub cluster. This takes effect only when ManagedClusterAutoApproval feature gate is enabled.", + "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.", + "importerConfiguration": "ImporterConfiguration is the configuration to import managed clusters from the hub cluster. It applies only when feature gate ClusterImporter is enabled.", } func (RegistrationHubConfiguration) SwaggerDoc() map[string]string {