Set the name of the current cluster into the kubesphere-config configmap

This commit is contained in:
Xinzhao Xu
2022-02-16 17:54:20 +08:00
parent 970780993e
commit e966a1da6f
6 changed files with 85 additions and 45 deletions

View File

@@ -53,6 +53,10 @@ type Options struct {
// HostClusterName is the name of the control plane cluster, default set to host.
HostClusterName string `json:"hostClusterName,omitempty" yaml:"hostClusterName,omitempty"`
// 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"`
}
// NewOptions returns a default nil options