@@ -88,7 +88,7 @@ func mutateHandler(w http.ResponseWriter, r *http.Request) {
8888 VolumeSource : corev1.VolumeSource {
8989 HostPath : func () * corev1.HostPathVolumeSource {
9090 h := corev1.HostPathVolumeSource {
91- Path : "/tmp /google_application_credentials.json" ,
91+ Path : "/var/lib/minikube /google_application_credentials.json" ,
9292 Type : func () * corev1.HostPathType {
9393 hpt := corev1 .HostPathFile
9494 return & hpt
@@ -114,8 +114,8 @@ func mutateHandler(w http.ResponseWriter, r *http.Request) {
114114
115115 // If GOOGLE_CLOUD_PROJECT is set in the VM, set it for all GCP apps.
116116 var e2 corev1.EnvVar
117- if _ , err := os .Stat ("/tmp /google_cloud_project" ); err == nil {
118- project , err := ioutil .ReadFile ("/tmp /google_cloud_project" )
117+ if _ , err := os .Stat ("/var/lib/minikube /google_cloud_project" ); err == nil {
118+ project , err := ioutil .ReadFile ("/var/lib/minikube /google_cloud_project" )
119119 if err == nil {
120120 e2 = corev1.EnvVar {
121121 Name : "GOOGLE_CLOUD_PROJECT" ,
@@ -208,7 +208,7 @@ func mutateHandler(w http.ResponseWriter, r *http.Request) {
208208}
209209
210210func main () {
211- log .Print ("Mutate webhook server started! Take 5. " )
211+ log .Print ("GCP Auth Webhook started!" )
212212
213213 mux := http .NewServeMux ()
214214
0 commit comments