Add ability to override namespace when running make deploy

This commit is contained in:
Shane McDonald
2021-09-29 15:31:19 -04:00
parent aa969e2a93
commit d9fbda5e15
4 changed files with 32 additions and 35 deletions

View File

@@ -37,6 +37,7 @@ BUNDLE_IMG ?= $(IMAGE_TAG_BASE)-bundle:v$(VERSION)
# Image URL to use all building/pushing image targets
IMG ?= $(IMAGE_TAG_BASE):$(VERSION)
NAMESPACE ?= awx
all: docker-build
@@ -77,6 +78,7 @@ uninstall: kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube
deploy: kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE}
$(KUSTOMIZE) build config/default | kubectl apply -f -
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config.