@@ -88,7 +88,7 @@ func mutateHandler(w http.ResponseWriter, r *http.Request) {
88
88
VolumeSource : corev1.VolumeSource {
89
89
HostPath : func () * corev1.HostPathVolumeSource {
90
90
h := corev1.HostPathVolumeSource {
91
- Path : "/tmp /google_application_credentials.json" ,
91
+ Path : "/var/lib/minikube /google_application_credentials.json" ,
92
92
Type : func () * corev1.HostPathType {
93
93
hpt := corev1 .HostPathFile
94
94
return & hpt
@@ -114,8 +114,8 @@ func mutateHandler(w http.ResponseWriter, r *http.Request) {
114
114
115
115
// If GOOGLE_CLOUD_PROJECT is set in the VM, set it for all GCP apps.
116
116
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" )
119
119
if err == nil {
120
120
e2 = corev1.EnvVar {
121
121
Name : "GOOGLE_CLOUD_PROJECT" ,
@@ -208,7 +208,7 @@ func mutateHandler(w http.ResponseWriter, r *http.Request) {
208
208
}
209
209
210
210
func main () {
211
- log .Print ("Mutate webhook server started! Take 5. " )
211
+ log .Print ("GCP Auth Webhook started!" )
212
212
213
213
mux := http .NewServeMux ()
214
214
0 commit comments