Skip to content

Commit 5b7bcab

Browse files
author
Mengqi Yu
committed
✨ use kustomize to apply CRDs
1 parent 3b35bcb commit 5b7bcab

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pkg/scaffold/v2/makefile.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,10 @@ run: generate fmt vet manifests
7171
7272
# Install CRDs into a cluster
7373
install: manifests
74-
kubectl apply -f config/crd/bases
74+
kustomize build config/crd | kubectl apply -f -
7575
7676
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
7777
deploy: manifests
78-
kubectl apply -f config/crd/bases
7978
cd config/manager && kustomize edit set image controller=${IMG}
8079
kustomize build config/default | kubectl apply -f -
8180

testdata/project-v2/Makefile

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@ run: generate fmt vet manifests
2727

2828
# Install CRDs into a cluster
2929
install: manifests
30-
kubectl apply -f config/crd/bases
30+
kustomize build config/crd | kubectl apply -f -
3131

3232
# Deploy controller in the configured Kubernetes cluster in ~/.kube/config
3333
deploy: manifests
34-
kubectl apply -f config/crd/bases
3534
cd config/manager && kustomize edit set image controller=${IMG}
3635
kustomize build config/default | kubectl apply -f -
3736

0 commit comments

Comments
 (0)