@@ -188,26 +188,26 @@ endif
188
188
189
189
.PHONY : install
190
190
install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config.
191
- sed -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
191
+ $( SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
192
192
$(KUSTOMIZE ) build config/crd | kubectl apply -f -
193
193
git restore config/*
194
194
195
195
.PHONY : uninstall
196
196
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.
197
- sed -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
197
+ $( SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
198
198
$(KUSTOMIZE ) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found ) -f -
199
199
git restore config/*
200
200
201
201
.PHONY : deploy
202
202
deploy : manifests kustomize # # Deploy controller to the K8s cluster specified in ~/.kube/config.
203
- sed -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
203
+ $( SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
204
204
cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
205
205
$(KUSTOMIZE ) build config/default | kubectl apply -f -
206
206
git restore config/*
207
207
208
208
.PHONY : undeploy
209
209
undeploy : # # Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
210
- sed -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
210
+ $( SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
211
211
$(KUSTOMIZE ) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found ) -f -
212
212
git restore config/*
213
213
@@ -225,6 +225,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
225
225
OPENSHIFT-GOIMPORTS ?= $(LOCALBIN ) /openshift-goimports
226
226
OPERATOR_SDK ?= $(LOCALBIN ) /operator-sdk
227
227
GH_CLI ?= $(LOCALBIN ) /gh
228
+ SED ?= /usr/bin/sed
228
229
229
230
# # Tool Versions
230
231
KUSTOMIZE_VERSION ?= v4.5.4
@@ -279,7 +280,7 @@ validate-bundle: install-operator-sdk
279
280
.PHONY : bundle
280
281
bundle : defaults manifests kustomize install-operator-sdk # # Generate bundle manifests and metadata, then validate generated files.
281
282
$(OPERATOR_SDK ) generate kustomize manifests -q
282
- sed -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
283
+ $( SED ) -i -E " s|(- )\$ {MCAD_REPO}.*|\1\$ {MCAD_CRD}|" config/crd/mcad/kustomization.yaml
283
284
cd config/manager && $(KUSTOMIZE ) edit set image controller=$(IMG )
284
285
cd config/manifests && $(KUSTOMIZE ) edit add patch --patch ' [{"op":"add", "path":"/metadata/annotations/containerImage", "value": "$(IMG)" }]' --kind ClusterServiceVersion
285
286
cd config/manifests && $(KUSTOMIZE ) edit add patch --patch ' [{"op":"add", "path":"/spec/replaces", "value": "codeflare-operator.$(PREVIOUS_VERSION)" }]' --kind ClusterServiceVersion
@@ -346,7 +347,7 @@ catalog-build-from-index: opm ## Build a catalog image.
346
347
mkdir catalog
347
348
$(OPM ) render $(CATALOG_BASE_IMG ) -o yaml > catalog/bundles.yaml
348
349
$(OPM ) render $(BUNDLE_IMG ) $(OPM_BUNDLE_OPT ) > catalog/codeflare-operator-bundle.yaml
349
- sed -i -E " s/(.*)(- name: codeflare-operator.$( PREVIOUS_VERSION) .*)/\1- name: codeflare-operator.$( VERSION) \n replaces: codeflare-operator.$( PREVIOUS_VERSION) \n\2/" catalog/bundles.yaml
350
+ $( SED ) -i -E " s/(.*)(- name: codeflare-operator.$( PREVIOUS_VERSION) .*)/\1- name: codeflare-operator.$( VERSION) \n replaces: codeflare-operator.$( PREVIOUS_VERSION) \n\2/" catalog/bundles.yaml
350
351
$(OPM ) validate catalog
351
352
$(OPM ) generate dockerfile catalog
352
353
podman build . -f catalog.Dockerfile -t $(CATALOG_IMG )
0 commit comments