Skip to content

Commit 7af4771

Browse files
committed
look for files in better spot
1 parent ca04769 commit 7af4771

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ image: build
99

1010

1111
.PHONY: push
12-
push: image ## Push gcp-auth-webhook docker image using gcloud
13-
gcloud docker -- push $(REGISTRY)/gcp-auth-webhook
12+
push: image
13+
docker push $(REGISTRY)/gcp-auth-webhook
1414

server.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

210210
func 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

Comments
 (0)