This commit moves away from using a global variable for default configuration checking, and instead exposes a method on LoadingRules to determine whether a particular restclient.Config should be considered "default". This allows kubectl to provide its own defaults (the same as before, KUBERNETES_MASTER and the static localhost:8080 values) while allowing other clients to avoid defining them. In-cluster config defaulting is now easier to read.
5.2 KiB
5.2 KiB