Skip to content

Commit 02e14b5

Browse files
astefanuttiopenshift-merge-robot
authored andcommitted
Add MCAD version variable
1 parent 3180604 commit 02e14b5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: Makefile

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ VERSION ?= 0.0.0-dev
1212
# INSTASCALE_VERSION defines the default version of the InstaScale controller
1313
INSTASCALE_VERSION ?= v0.0.4
1414

15+
# MCAD_VERSION defines the default version of the MCAD controller
16+
MCAD_VERSION ?= v1.31.0
17+
1518
# CHANNELS define the bundle channels used in the bundle.
1619
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
1720
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
@@ -200,6 +203,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
200203

201204
.PHONY: deploy
202205
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)
203207
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
204208
$(KUSTOMIZE) build config/default | kubectl apply -f -
205209
git restore config/*
@@ -297,6 +301,7 @@ validate-bundle: install-operator-sdk
297301
.PHONY: bundle
298302
bundle: defaults manifests kustomize install-operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
299303
$(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)
300305
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
301306
cd config/manifests && $(KUSTOMIZE) edit add patch --patch '[{"op":"add", "path":"/metadata/annotations/containerImage", "value": "$(IMG)" }]' --kind ClusterServiceVersion
302307
cd config/manifests && $(KUSTOMIZE) edit add patch --patch '[{"op":"add", "path":"/spec/replaces", "value": "codeflare-operator.v$(PREVIOUS_VERSION)" }]' --kind ClusterServiceVersion

Diff for: config/crd/mcad/kustomization.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
13
resources:
2-
- github.com/project-codeflare/multi-cluster-app-dispatcher/config/crd?ref=release-v1.31.0
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}

0 commit comments

Comments
 (0)