newOpenShiftClientConfigLoadingRules is a modified copy of openshift/origin/pkg/cmd/cli/config.NewOpenShiftClientConfigLoadingRules. NewOpenShiftClientConfigLoadingRules returns file priority loading rules for OpenShift. 1. --config value 2. if KUBECONFIG env var has a value, use it. Otherwise, ~/.k
()
| 98 | // 1. --config value |
| 99 | // 2. if KUBECONFIG env var has a value, use it. Otherwise, ~/.kube/config file |
| 100 | func newOpenShiftClientConfigLoadingRules() *clientConfigLoadingRules { |
| 101 | chain := []string{} |
| 102 | |
| 103 | envVarFile := os.Getenv("KUBECONFIG") |
| 104 | if len(envVarFile) != 0 { |
| 105 | chain = append(chain, filepath.SplitList(envVarFile)...) |
| 106 | } else { |
| 107 | chain = append(chain, recommendedHomeFile) |
| 108 | } |
| 109 | |
| 110 | return &clientConfigLoadingRules{ |
| 111 | Precedence: chain, |
| 112 | // REMOVED: Migration support; run (oc login) to trigger migration |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | // deferredLoadingClientConfig is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.DeferredLoadingClientConfig. |
| 117 | // DeferredLoadingClientConfig is a ClientConfig interface that is backed by a set of loading rules |
no outgoing calls
searching dependent graphs…