未验证 提交 42b543ec 编写于 作者: K KubeSphere CI Bot 提交者: GitHub

Merge pull request #2415 from wansir/kubeconfig

fix: empty server host
......@@ -181,7 +181,7 @@ func (o *operator) GetKubeConfig(username string) (string, error) {
masterURL := o.masterURL
// server host override
if cluster := kubeconfig.Clusters[defaultClusterName]; cluster != nil {
if cluster := kubeconfig.Clusters[defaultClusterName]; cluster != nil && masterURL != "" {
cluster.Server = masterURL
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册