Skip to content

Commit c093d58

Browse files
sutaakaropenshift-merge-robot
authored andcommitted
Use sed command to replace MCAD repo reference in Makefile
1 parent 4ae9e8f commit c093d58

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Diff for: Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -249,26 +249,26 @@ endif
249249

250250
.PHONY: install
251251
install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.
252-
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_CRD=$(MCAD_CRD)
252+
sed -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml
253253
$(KUSTOMIZE) build config/crd | kubectl apply -f -
254254
git restore config/*
255255

256256
.PHONY: uninstall
257257
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.
258-
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_CRD=$(MCAD_CRD)
258+
sed -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml
259259
$(KUSTOMIZE) build config/crd | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
260260
git restore config/*
261261

262262
.PHONY: deploy
263263
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
264-
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_CRD=$(MCAD_CRD)
264+
sed -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml
265265
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
266266
$(KUSTOMIZE) build config/default | kubectl apply -f -
267267
git restore config/*
268268

269269
.PHONY: undeploy
270270
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.
271-
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_CRD=$(MCAD_CRD)
271+
sed -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml
272272
$(KUSTOMIZE) build config/default | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
273273
git restore config/*
274274

@@ -367,7 +367,7 @@ validate-bundle: install-operator-sdk
367367
.PHONY: bundle
368368
bundle: defaults manifests kustomize install-operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
369369
$(OPERATOR_SDK) generate kustomize manifests -q
370-
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_CRD=$(MCAD_CRD)
370+
sed -i -E "s|(- )\${MCAD_REPO}.*|\1\${MCAD_CRD}|" config/crd/mcad/kustomization.yaml
371371
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
372372
cd config/manifests && $(KUSTOMIZE) edit add patch --patch '[{"op":"add", "path":"/metadata/annotations/containerImage", "value": "$(IMG)" }]' --kind ClusterServiceVersion
373373
cd config/manifests && $(KUSTOMIZE) edit add patch --patch '[{"op":"add", "path":"/spec/replaces", "value": "codeflare-operator.$(PREVIOUS_VERSION)" }]' --kind ClusterServiceVersion

Diff for: README.md

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ CodeFlare Stack Compatibility Matrix
1717

1818
## Development
1919

20+
Requirements:
21+
- GNU sed - sed is used in several Makefile command. Using macOS default sed is incompatible, so GNU sed is needed for correct execution of these commands.
22+
2023
### Testing
2124

2225
The e2e tests can be executed locally by running the following commands:

0 commit comments

Comments
 (0)