Skip to content

Commit

Permalink
Add kustomize to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
grischperl committed Dec 20, 2023
1 parent c61ff0e commit 0982fa5
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions hack/ci/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
## Tool Binary
KUSTOMIZE ?= $(LOCALBIN)/kustomize
## Tool Version
KUSTOMIZE_VERSION ?= v5.0.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
$(KUSTOMIZE): $(LOCALBIN)
@if test -x $(LOCALBIN)/kustomize && ! $(LOCALBIN)/kustomize version | grep -q $(KUSTOMIZE_VERSION); then \
echo "$(LOCALBIN)/kustomize version is not expected $(KUSTOMIZE_VERSION). Removing it before installing."; \
rm -rf $(LOCALBIN)/kustomize; \
fi
test -s $(LOCALBIN)/kustomize || { curl -Ss $(KUSTOMIZE_INSTALL_SCRIPT) --output install_kustomize.sh && bash install_kustomize.sh $(subst v,,$(KUSTOMIZE_VERSION)) $(LOCALBIN); rm install_kustomize.sh; }


.PHONY: install-eventing-manager
install-eventing-manager: ## Install CRDs into the K8s cluster specified in ~/.kube/config.
kubectl apply -k ./../e2e/config/
install-eventing-manager: kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
$(KUSTOMIZE) build ./../e2e/config | kubectl apply -f -

.PHONY: install-k3d-tools
install-k3d-tools: ## Create k3d with kyma CRDs.
Expand Down

0 comments on commit 0982fa5

Please sign in to comment.