未验证 提交 311c5289 编写于 作者: H hongming

fix: empty server host

Signed-off-by: Nhongming <talonwan@yunify.com>
上级 78159e96
......@@ -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.
先完成此消息的编辑!
想要评论请 注册