Skip to content

Commit 2e6420e

Browse files
authored
Update the kustomize (#428)
1 parent 411bbb3 commit 2e6420e

File tree

5 files changed

+21
-170
lines changed

5 files changed

+21
-170
lines changed

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ run: generate fmt vet manifests
7777
go run ./main.go
7878

7979
# Install CRDs into a cluster
80-
install: manifests
81-
kustomize build config/crd | kubectl apply -f -
80+
install: manifests $(KUSTOMIZE)
81+
$(KUSTOMIZE) build config/crd | kubectl apply -f -
8282

8383
# Uninstall CRDs from a cluster
84-
uninstall: manifests
85-
kustomize build config/crd | kubectl delete -f -
84+
uninstall: manifests $(KUSTOMIZE)
85+
$(KUSTOMIZE) build config/crd | kubectl delete -f -
8686

8787
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
88-
deploy: manifests
89-
cd config/manager && kustomize edit set image controller=${IMG}
90-
kustomize build config/default | kubectl apply -f -
88+
deploy: manifests $(KUSTOMIZE)
89+
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
90+
$(KUSTOMIZE) build config/default | kubectl apply -f -
9191

9292
# Generate manifests e.g. CRD, RBAC etc.
9393
manifests: controller-gen

hack/tools/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ $(GOLANGCI_LINT): $(BIN_DIR) go.mod go.sum # Build golangci-lint from tools fold
4747

4848
KUSTOMIZE := $(BIN_DIR)/kustomize
4949
$(KUSTOMIZE): $(BIN_DIR) go.mod go.sum # Build kustomize from tools folder.
50-
CGO_ENABLED=0 go build -tags=tools -o $@ sigs.k8s.io/kustomize/kustomize/v3
50+
CGO_ENABLED=0 go build -tags=tools -o $@ sigs.k8s.io/kustomize/kustomize/v4
5151

5252
MDBOOK_SHARE := $(SHARE_DIR)/mdbook$(MDBOOK_ARCHIVE_EXT)
5353
$(MDBOOK_SHARE): ../../versions.mk $(SHARE_DIR)

hack/tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ require (
1313
sigs.k8s.io/cluster-api/hack/tools v0.0.0-20211118171502-aafa086da595
1414
sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20211110210527-619e6b92dab9
1515
sigs.k8s.io/controller-tools v0.7.1-0.20211110210727-ab52f76cc7d1
16-
sigs.k8s.io/kustomize/kustomize/v3 v3.10.0
16+
sigs.k8s.io/kustomize/kustomize/v4 v4.4.1
1717
)

0 commit comments

Comments
 (0)