Skip to content

Commit

Permalink
kubectl for loading certs & secrets should always use pl namespace
Browse files Browse the repository at this point in the history
Summary: Use pl namespace to avoid loading certs and secrets into wrong namespace.

Test Plan: I ran it once...seemed to work.

Reviewers: zasgar, #engineering

Reviewed By: zasgar, #engineering

Subscribers: michelle

Differential Revision: https://phab.corp.pixielabs.ai/D652

GitOrigin-RevId: 0ab5b5d
  • Loading branch information
oazizi000 committed Apr 25, 2019
1 parent e6916b1 commit 994b3e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ MINIKUBE := minikube

## Kubectl command to use.
KUBECTL := kubectl
KUBECTL_FLAGS := -n pl

## Skaffold command to use.
SKAFFOLD := skaffold
Expand Down Expand Up @@ -71,12 +72,12 @@ gazelle: gazelle-repos ## Run gazelle to update go build rules.
go-setup: dep-ensure gazelle

k8s-load-certs:
-$(KUBECTL) delete secret custom-tls-cert
$(KUBECTL) create secret tls custom-tls-cert --key src/services/certs/server.key --cert src/services/certs/server.crt
-$(KUBECTL) $(KUBECTL_FLAGS) delete secret custom-tls-cert
$(KUBECTL) $(KUBECTL_FLAGS) create secret tls custom-tls-cert --key src/services/certs/server.key --cert src/services/certs/server.crt

k8s-load-dev-secrets: #Loads the secrets used by the dev environment. At some point it might makse sense to move this into a dev setup script somewhere.
-$(KUBECTL) delete secret pl-app-secrets
$(KUBECTL) create secret generic pl-app-secrets \
-$(KUBECTL) $(KUBECTL_FLAGS) delete secret pl-app-secrets
$(KUBECTL) $(KUBECTL_FLAGS) create secret generic pl-app-secrets \
--from-literal=jwt-signing-key=ABCDEFG \
--from-literal=session-key=test-session-key \
--from-literal=auth0-client-id=qaAfEHQT7mRt6W0gMd9mcQwNANz9kRup \
Expand Down

0 comments on commit 994b3e5

Please sign in to comment.