Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit c05ce64

Browse files
committed
fix panic when encoutering malformed cluster config
1 parent 7dbc2f6 commit c05ce64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/controller/kubefedcluster/clusterclient.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ func NewClusterClientSet(c *fedv1b1.KubeFedCluster, client generic.Client, fedNa
7575
return &clusterClientSet, err
7676
}
7777
clusterConfig.Timeout = timeout
78-
clusterClientSet.kubeClient = kubeclientset.NewForConfigOrDie((restclient.AddUserAgent(clusterConfig, UserAgentName)))
79-
return &clusterClientSet, nil
78+
clusterClientSet.kubeClient, err = kubeclientset.NewForConfig(restclient.AddUserAgent(clusterConfig, UserAgentName))
79+
return &clusterClientSet, err
8080
}
8181

8282
// GetClusterHealthStatus gets the kubernetes cluster health status by requesting "/healthz"

0 commit comments

Comments
 (0)