detect_kube_auth_mode

Function detect_kube_auth_mode 

Source
pub fn detect_kube_auth_mode() -> KubeAuthMode
Expand description

Inspect environment variables and return which Kubernetes auth mode should be used.

Returns KubeAuthMode::Explicit only when all three of KUBE_API_SERVER, KUBE_TOKEN_PATH, and KUBE_CA_CERT_PATH are present. If only some are set a warning is logged and KubeAuthMode::Default is returned so that existing in-cluster and kubeconfig deployments are unaffected.