Skip to content

Commit

Permalink
Consolidate kustomize binaries in DSPO Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
diegolovison committed Aug 2, 2024
1 parent c03a6ab commit f33d8b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/kind-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- tests/**
- .github/resources/**
- '.github/workflows/kind-integration.yml'
- Makefile
types:
- opened
- reopened
Expand Down
20 changes: 8 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,17 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
$(KUSTOMIZE) build config/overlays/make-deploy | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

.PHONY: deploy-kind
deploy-kind:
deploy-kind: manifests kustomize
cd config/overlays/kind-tests \
&& kustomize edit set image controller=${IMG} \
&& kustomize edit set namespace ${OPERATOR_NS}
kustomize build config/overlays/kind-tests | kubectl apply -f -
&& $(KUSTOMIZE) edit set image controller=${IMG} \
&& $(KUSTOMIZE) edit set namespace ${OPERATOR_NS}
$(KUSTOMIZE) build config/overlays/kind-tests | kubectl apply -f -

.PHONY: undeploy-kind
undeploy-kind: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
undeploy-kind: manifests kustomize ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
cd config/overlays/kind-tests \
&& kustomize edit set namespace ${OPERATOR_NS}
kustomize build config/overlays/kind-tests | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
&& $(KUSTOMIZE) edit set namespace ${OPERATOR_NS}
$(KUSTOMIZE) build config/overlays/kind-tests | kubectl delete --ignore-not-found=$(ignore-not-found) -f -

##@ Build Dependencies

Expand All @@ -204,11 +204,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
## Tool Versions
arch:= $(shell uname -m)

ifeq ($(arch), ppc64le)
KUSTOMIZE_VERSION ?= v5.1.0
else
KUSTOMIZE_VERSION ?= v3.8.7
endif
KUSTOMIZE_VERSION ?= v5.2.1
CONTROLLER_TOOLS_VERSION ?= v0.10.0

KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
Expand Down

0 comments on commit f33d8b5

Please sign in to comment.