Skip to content

Commit 7945b8b

Browse files
committed
Moved params to manager altered make file
1 parent fc72c50 commit 7945b8b

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified
198198

199199
.PHONY: deploy
200200
deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
201-
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
201+
cd config/manager && IMAGE=$(IMG) perl -i -pe 's/odh-codeflare-operator-controller-image=(.*)$$/odh-codeflare-operator-controller-image=$$ENV{"IMAGE"}/' params.env
202202
$(KUSTOMIZE) build config/${ENV} | kubectl apply -f -
203203
git restore config/*
204204

@@ -283,7 +283,7 @@ validate-bundle: install-operator-sdk
283283

284284
.PHONY: bundle
285285
bundle: manifests kustomize install-operator-sdk ## Generate bundle manifests and metadata, then validate generated files.
286-
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
286+
cd config/manager && IMAGE=$(IMG) perl -i -pe 's/odh-codeflare-operator-controller-image=(.*)$$/odh-codeflare-operator-controller-image=$$ENV{"IMAGE"}/' params.env
287287
$(KUSTOMIZE) build config/manifests | $(OPERATOR_SDK) generate bundle $(BUNDLE_GEN_FLAGS)
288288
$(MAKE) validate-bundle
289289
git restore config/*

config/manager/kustomization.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,19 @@ resources:
33

44
generatorOptions:
55
disableNameSuffixHash: true
6+
7+
configMapGenerator:
8+
- name: codeflare-stack-config
9+
envs:
10+
- params.env
11+
configurations:
12+
- params.yaml
13+
14+
vars:
15+
- name: odh_codeflare_operator_controller_image
16+
objref:
17+
kind: ConfigMap
18+
name: codeflare-stack-config
19+
apiVersion: v1
20+
fieldref:
21+
fieldpath: data.odh-codeflare-operator-controller-image

config/manager/manager.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ spec:
3434
containers:
3535
- command:
3636
- /manager
37-
image: controller:latest
37+
image: $(odh_codeflare_operator_controller_image)
3838
imagePullPolicy: Always
3939
name: manager
4040
securityContext:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
odh-codeflare-operator-controller-image=quay.io/opendatahub/codeflare-operator:v1.0.0
1+
odh-codeflare-operator-controller-image=quay.io/opendatahub/codeflare-operator:v1.0.1
File renamed without changes.

config/manifests/kustomization.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,7 @@
33
resources:
44
- ../default
55
- ../scorecard
6+
- codeflare-operator.clusterserviceversion.yaml
67

78
apiVersion: kustomize.config.k8s.io/v1beta1
89
kind: Kustomization
9-
10-
configMapGenerator:
11-
- name: codeflare-stack-config
12-
envs:
13-
- params.env
14-
configurations:
15-
- params.yaml
16-
17-
vars:
18-
- name: odh-codeflare-operator-controller-image
19-
objref:
20-
kind: ConfigMap
21-
name: codeflare-stack-config
22-
apiVersion: v1
23-
fieldref:
24-
fieldpath: data.odh-codeflare-operator-controller-image

0 commit comments

Comments
 (0)