@@ -151,6 +151,7 @@ manifests: controller-gen kustomize ## Generate RBAC objects.
151
151
$(CONTROLLER_GEN ) rbac:roleName=manager-role webhook paths=" ./..."
152
152
$(SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
153
153
$(KUSTOMIZE ) build config/crd/mcad > config/crd/mcad.yaml
154
+ git restore config/*
154
155
155
156
.PHONY : fmt
156
157
fmt : # # Run go fmt against code.
@@ -194,19 +195,16 @@ endif
194
195
195
196
.PHONY : install
196
197
install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config.
197
- $(SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
198
198
$(KUSTOMIZE ) build config/crd | kubectl apply -f -
199
199
git restore config/*
200
200
201
201
.PHONY : uninstall
202
202
uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
203
- $(SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
204
203
$(KUSTOMIZE ) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found ) -f -
205
204
git restore config/*
206
205
207
206
.PHONY : deploy
208
207
deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
209
- $(SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
210
208
cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
211
209
$(KUSTOMIZE ) build config/${ENV} | kubectl apply -f -
212
210
git restore config/*
@@ -286,7 +284,6 @@ validate-bundle: install-operator-sdk
286
284
.PHONY : bundle
287
285
bundle : defaults manifests kustomize install-operator-sdk # # Generate bundle manifests and metadata, then validate generated files.
288
286
$(OPERATOR_SDK ) generate kustomize manifests -q
289
- $(SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
290
287
cd config/manager && $(KUSTOMIZE ) edit set image controller=$(IMG )
291
288
cd config/manifests && $(KUSTOMIZE ) edit add patch --patch ' [{"op":"add", "path":"/metadata/annotations/containerImage", "value": "$(IMG)" }]' --kind ClusterServiceVersion
292
289
cd config/manifests && $(KUSTOMIZE ) edit add patch --patch ' [{"op":"add", "path":"/spec/replaces", "value": "codeflare-operator.$(PREVIOUS_VERSION)" }]' --kind ClusterServiceVersion
0 commit comments