mirror of
https://github.com/paralus/paralus.git
synced 2026-05-07 00:46:52 +00:00
* restructure rcloud-base as a single base controller * updated master.rest * moved sentry from internal to pkg as it is used by relay * removing unused rpc and it's dependencies * Fix usermgmt tests * Don't redefine variables in rest file Co-authored-by: Abin Simon <abin.simon@rafay.co>
32 lines
1000 B
Go
32 lines
1000 B
Go
package leaderelection
|
|
|
|
import (
|
|
"sigs.k8s.io/controller-runtime/pkg/client/config"
|
|
)
|
|
|
|
// aliasing controller runtime config package
|
|
|
|
var (
|
|
// GetConfigOrDie creates a *rest.Config for talking to a Kubernetes apiserver.
|
|
// If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running
|
|
// in cluster and use the cluster provided kubeconfig.
|
|
//
|
|
// Will log an error and exit if there is an error creating the rest.Config.
|
|
GetConfigOrDie = config.GetConfigOrDie
|
|
|
|
// GetConfig creates a *rest.Config for talking to a Kubernetes apiserver.
|
|
// If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running
|
|
// in cluster and use the cluster provided kubeconfig.
|
|
//
|
|
// Config precedence
|
|
//
|
|
// * --kubeconfig flag pointing at a file
|
|
//
|
|
// * KUBECONFIG environment variable pointing at a file
|
|
//
|
|
// * In-cluster config if running in cluster
|
|
//
|
|
// * $HOME/.kube/config if exists
|
|
GetConfig = config.GetConfig
|
|
)
|