From 782f97c42cc589419200bfccfd44c342ba010826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20Steinbru=CC=88ck?= Date: Fri, 29 Oct 2021 11:23:11 +0200 Subject: [PATCH] Add make task to create resources without applying to the cluster --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c9d54dcf..21bd829b 100644 --- a/Makefile +++ b/Makefile @@ -76,10 +76,13 @@ install: kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/con uninstall: kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/crd | kubectl delete -f - +gen-resources: kustomize ## Generate resources for controller and print to stdout + @cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} + @cd config/default && $(KUSTOMIZE) edit set namespace ${NAMESPACE} + @$(KUSTOMIZE) build config/default + 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 - + $(MAKE) gen-resources | kubectl apply -f - undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. $(KUSTOMIZE) build config/default | kubectl delete -f -