From ca4661a68697c02aa92239525871c4c7d6540611 Mon Sep 17 00:00:00 2001 From: Xinzhao Xu Date: Mon, 7 Mar 2022 18:32:04 +0800 Subject: [PATCH 1/2] Add ClusterRole field in the multicluster option --- pkg/simple/client/multicluster/options.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/simple/client/multicluster/options.go b/pkg/simple/client/multicluster/options.go index dfc5b9acc..84a4558e7 100644 --- a/pkg/simple/client/multicluster/options.go +++ b/pkg/simple/client/multicluster/options.go @@ -31,6 +31,7 @@ const ( type Options struct { // Enable + // Deprecated: this field will be removed in the future version, use ClusterRole instead. Enable bool `json:"enable" yaml:"enable"` EnableFederation bool `json:"enableFederation,omitempty" yaml:"enableFederation,omitempty"` @@ -57,6 +58,10 @@ type Options struct { // ClusterName is the name of the current cluster, // this value will be set by the cluster-controller and stored in the kubesphere-config configmap. ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"` + + // ClusterRole is the role of the current cluster, + // available values: host, member. + ClusterRole string `json:"clusterRole,omitempty" yaml:"clusterRole,omitempty"` } // NewOptions returns a default nil options From 0065d0dca3eb3ae75d79f917d5f300fb4bebcfce Mon Sep 17 00:00:00 2001 From: Xinzhao Xu Date: Mon, 7 Mar 2022 17:18:15 +0800 Subject: [PATCH 2/2] remove the unused EnableFederation field --- pkg/simple/client/multicluster/options.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/simple/client/multicluster/options.go b/pkg/simple/client/multicluster/options.go index 84a4558e7..4c45f98b0 100644 --- a/pkg/simple/client/multicluster/options.go +++ b/pkg/simple/client/multicluster/options.go @@ -32,8 +32,7 @@ const ( type Options struct { // Enable // Deprecated: this field will be removed in the future version, use ClusterRole instead. - Enable bool `json:"enable" yaml:"enable"` - EnableFederation bool `json:"enableFederation,omitempty" yaml:"enableFederation,omitempty"` + Enable bool `json:"enable" yaml:"enable"` // ProxyPublishService is the service name of multicluster component tower. // If this field provided, apiserver going to use the ingress.ip of this service. @@ -68,7 +67,6 @@ type Options struct { func NewOptions() *Options { return &Options{ Enable: false, - EnableFederation: false, ProxyPublishAddress: "", ProxyPublishService: "", AgentImage: "kubesphere/tower:v1.0",