MCPcopy Create free account
hub / github.com/Qovery/engine / remove_gke_gcloud_auth_plugin_cache

Function remove_gke_gcloud_auth_plugin_cache

lib-engine/src/hack/mod.rs:10–17  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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
10pub 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}

Callers 4

runMethod · 0.85
runMethod · 0.85
runMethod · 0.85
runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected