craigcondit commented on code in PR #480:
URL: https://github.com/apache/yunikorn-k8shim/pull/480#discussion_r1023933459
##########
pkg/client/kubeclient.go:
##########
@@ -73,6 +68,29 @@ func newSchedulerKubeClient(kc string) SchedulerKubeClient {
}
}
+func createRestConfig(kc string) *rest.Config {
+ // attempt to use in-cluster config
+ config, err := rest.InClusterConfig()
+ if err != nil && err != rest.ErrNotInCluster {
+ // this is called during early initialization, so abort
+ panic(err)
Review Comment:
Circular dependencies. This is called before logging is safe to call. Panic
will log the error and abort, so we still get it. It's also pretty unlikely to
fail in real life.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]