Hack Binary gke-gcloud-auth-plugin used to access kube (in kubeconfig) write cache file in ~/.kube/gke_gcloud_auth_plugin_cache it is not possible to modify the path of this cache to be user/deployment specific https://github.com/kubernetes/cloud-provider-gcp/issues/554 So we remove it before running gcloud auth activate-service-account **but** it does break the isolation per deployment meaning th
()
| 8 | // meaning the engine will never be able to do concurrent deployment on different gcp cluster at the same time |
| 9 | // It is not an issue for now as 1 engine is running at max 1 deployment |
| 10 | pub fn remove_gke_gcloud_auth_plugin_cache() { |
| 11 | let path = std::env::home_dir() |
| 12 | .unwrap_or_default() |
| 13 | .join(".kube") |
| 14 | .join("gke_gcloud_auth_plugin_cache"); |
| 15 | info!("Removing gke_gcloud_auth_plugin_cache file {}", path.display()); |
| 16 | let _ = fs::remove_file(path); |
| 17 | } |