Skip to content

Commit 49a8ce2

Browse files
Merge pull request #43 from tchughesiv/bundleUpgrades
handle bundle upgrades
2 parents 35d6802 + f887100 commit 49a8ce2

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

Makefile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ SHELL := /usr/bin/env bash
66
# To re-generate a bundle for another specific version without changing the standard setup, you can:
77
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
88
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
9-
VERSION ?= 0.5.0
9+
VERSION ?= 0.8.0
10+
11+
CONTAINER_ENGINE?=docker
1012

1113
# CHANNELS define the bundle channels used in the bundle.
1214
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "preview,fast,stable")
@@ -37,7 +39,7 @@ IMGVERSION ?= $(IMG):$(VERSION)
3739
BUNDLE_IMG ?= $(IMG)-bundle:$(VERSION)
3840

3941
# The image tag given to the resulting catalog image (e.g. make catalog-build CATALOG_IMG=example.com/operator-catalog:0.2.0).
40-
CATALOG_IMG ?= $(IMG)-catalog:latest
42+
CATALOG_IMG ?= $(IMG)-catalog:$(VERSION)
4143

4244
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
4345
ifeq (,$(shell go env GOBIN))
@@ -151,17 +153,17 @@ bundle: manifests kustomize ## Generate bundle manifests and metadata, update se
151153

152154
.PHONY: bundle-build
153155
bundle-build: ## Build the bundle image.
154-
docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
156+
$(CONTAINER_ENGINE) build -f bundle.Dockerfile -t $(BUNDLE_IMG) .
155157

156158
.PHONY: bundle-push
157159
bundle-push: ## Push the bundle image.
158-
docker push $(BUNDLE_IMG)
160+
$(CONTAINER_ENGINE) push $(BUNDLE_IMG)
159161

160162
docker-build: ## Build the docker image
161-
docker build -t $(IMGVERSION) .
163+
$(CONTAINER_ENGINE) build -t $(IMGVERSION) .
162164

163165
docker-push: ## Push the docker image
164-
docker push $(IMGVERSION)
166+
$(CONTAINER_ENGINE) push $(IMGVERSION)
165167

166168
# Additional make goals
167169
.PHONY: run-kind
@@ -218,9 +220,9 @@ endif
218220
# https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator
219221
.PHONY: catalog-build
220222
catalog-build: opm ## Build a catalog image.
221-
$(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
223+
$(OPM) index add --container-tool $(CONTAINER_ENGINE) --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT)
222224

223225
# Push the catalog image.
224226
.PHONY: catalog-push
225227
catalog-push: ## Push a catalog image.
226-
docker push $(CATALOG_IMG)
228+
$(CONTAINER_ENGINE) push $(CATALOG_IMG)

bundle/manifests/mongodb-atlas-kubernetes.clusterserviceversion.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ metadata:
116116
Clusters in MongoDB Atlas
117117
operators.operatorframework.io/builder: operator-sdk-v1.10.0+git
118118
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
119-
name: mongodb-atlas-kubernetes.v0.7.0
119+
name: mongodb-atlas-kubernetes.v0.8.0
120120
namespace: placeholder
121121
spec:
122122
apiservicedefinitions: {}
@@ -478,7 +478,7 @@ spec:
478478
fieldPath: metadata.namespace
479479
- name: SYNC_PERIOD_MIN
480480
value: "180"
481-
image: registry.connect.redhat.com/mongodb/mongodb-atlas-kubernetes-operator:0.7.0
481+
image: registry.connect.redhat.com/mongodb/mongodb-atlas-kubernetes-operator:0.8.0
482482
imagePullPolicy: Always
483483
livenessProbe:
484484
httpGet:
@@ -553,4 +553,5 @@ spec:
553553
maturity: beta
554554
provider:
555555
name: MongoDB, Inc
556-
version: 0.7.0
556+
replaces: mongodb-atlas-kubernetes.v0.2.0
557+
version: 0.8.0

config/manager/kustomization.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ kind: Kustomization
88
images:
99
- name: controller
1010
newName: registry.connect.redhat.com/mongodb/mongodb-atlas-kubernetes-operator
11-
newTag: 0.7.0
11+
newTag: 0.8.0

config/manifests/bases/mongodb-atlas-kubernetes.clusterserviceversion.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,4 +189,5 @@ spec:
189189
maturity: beta
190190
provider:
191191
name: MongoDB, Inc
192+
replaces: mongodb-atlas-kubernetes.v0.2.0
192193
version: 0.0.0

0 commit comments

Comments
 (0)