Skip to content

Commit 73db60f

Browse files
astefanuttiopenshift-merge-robot
authored andcommitted
Extended support for referencing MCAD CRD resources
1 parent 02e14b5 commit 73db60f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ INSTASCALE_VERSION ?= v0.0.4
1414

1515
# MCAD_VERSION defines the default version of the MCAD controller
1616
MCAD_VERSION ?= v1.31.0
17+
# MCAD_REF, MCAD_REPO and MCAD_CRD define the reference to MCAD CRD resources
18+
MCAD_REF ?= release-${MCAD_VERSION}
19+
MCAD_REPO ?= github.com/project-codeflare/multi-cluster-app-dispatcher
20+
MCAD_CRD ?= ${MCAD_REPO}/config/crd?ref=${MCAD_REF}
1721

1822
# CHANNELS define the bundle channels used in the bundle.
1923
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
@@ -203,7 +207,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
203207

204208
.PHONY: deploy
205209
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
206-
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_VERSION=$(MCAD_VERSION)
210+
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_CRD=$(MCAD_CRD)
207211
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
208212
$(KUSTOMIZE) build config/default | kubectl apply -f -
209213
git restore config/*
@@ -301,7 +305,7 @@ validate-bundle: install-operator-sdk
301305
.PHONY: bundle
302306
bundle: defaults manifests kustomize install-operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
303307
$(OPERATOR_SDK) generate kustomize manifests -q
304-
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_VERSION=$(MCAD_VERSION)
308+
$(KUSTOMIZE) fn run config/crd/mcad --image gcr.io/kpt-fn/apply-setters:v0.2.0 -- MCAD_CRD=$(MCAD_CRD)
305309
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
306310
cd config/manifests && $(KUSTOMIZE) edit add patch --patch '[{"op":"add", "path":"/metadata/annotations/containerImage", "value": "$(IMG)" }]' --kind ClusterServiceVersion
307311
cd config/manifests && $(KUSTOMIZE) edit add patch --patch '[{"op":"add", "path":"/spec/replaces", "value": "codeflare-operator.v$(PREVIOUS_VERSION)" }]' --kind ClusterServiceVersion

config/crd/mcad/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
apiVersion: kustomize.config.k8s.io/v1beta1
22
kind: Kustomization
33
resources:
4-
- github.com/project-codeflare/multi-cluster-app-dispatcher/config/crd?ref=release-v0.0.0 # kpt-set: github.com/project-codeflare/multi-cluster-app-dispatcher/config/crd?ref=release-${MCAD_VERSION}
4+
- github.com/project-codeflare/multi-cluster-app-dispatcher/config/crd?ref=release-v0.0.0 # kpt-set: ${MCAD_CRD}

0 commit comments

Comments
 (0)