Merge pull request #2269 from zhuwint/devctl
Adjust the order of kubeconfig loadingRules
This commit is contained in:
commit
8c6a357a43
|
@ -13,8 +13,8 @@ func RestConfig(context, kubeconfigPath string) (*rest.Config, error) {
|
||||||
pathOptions := clientcmd.NewDefaultPathOptions()
|
pathOptions := clientcmd.NewDefaultPathOptions()
|
||||||
|
|
||||||
loadingRules := *pathOptions.LoadingRules
|
loadingRules := *pathOptions.LoadingRules
|
||||||
loadingRules.Precedence = pathOptions.GetLoadingPrecedence()
|
|
||||||
loadingRules.ExplicitPath = kubeconfigPath
|
loadingRules.ExplicitPath = kubeconfigPath
|
||||||
|
loadingRules.Precedence = pathOptions.GetLoadingPrecedence()
|
||||||
overrides := &clientcmd.ConfigOverrides{
|
overrides := &clientcmd.ConfigOverrides{
|
||||||
CurrentContext: context,
|
CurrentContext: context,
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,8 +44,8 @@ func (a *karmadaConfig) GetRestConfig(context, kubeconfigPath string) (*rest.Con
|
||||||
// context and kubeconfig passed as arguments.
|
// context and kubeconfig passed as arguments.
|
||||||
func (a *karmadaConfig) GetClientConfig(context, kubeconfigPath string) clientcmd.ClientConfig {
|
func (a *karmadaConfig) GetClientConfig(context, kubeconfigPath string) clientcmd.ClientConfig {
|
||||||
loadingRules := *a.pathOptions.LoadingRules
|
loadingRules := *a.pathOptions.LoadingRules
|
||||||
loadingRules.Precedence = a.pathOptions.GetLoadingPrecedence()
|
|
||||||
loadingRules.ExplicitPath = kubeconfigPath
|
loadingRules.ExplicitPath = kubeconfigPath
|
||||||
|
loadingRules.Precedence = a.pathOptions.GetLoadingPrecedence()
|
||||||
overrides := &clientcmd.ConfigOverrides{
|
overrides := &clientcmd.ConfigOverrides{
|
||||||
CurrentContext: context,
|
CurrentContext: context,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue