Skip to content

Commit cfa8dc1

Browse files
committed
Add olm.skipRange to allow OLM upgrades
1 parent 9395e12 commit cfa8dc1

2 files changed

Lines changed: 3 additions & 9 deletions

File tree

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ else
4343
GOBIN=$(shell go env GOBIN)
4444
endif
4545

46+
YQ=yq
47+
4648
all: manager
4749

4850
# Run tests
@@ -132,6 +134,7 @@ bundle: manifests
132134
operator-sdk generate kustomize manifests -q
133135
cd config/manager && $(KUSTOMIZE) edit set image controller=$(IMG)
134136
$(KUSTOMIZE) build config/manifests | operator-sdk generate bundle -q --overwrite --version $(VERSION) $(BUNDLE_METADATA_OPTS)
137+
$(YQ) eval -i ".metadata.annotations.\"olm.skipRange\" = \"<$(VERSION)\"" bundle/manifests/function-mesh.clusterserviceversion.yaml
135138
operator-sdk bundle validate ./bundle
136139

137140
# Build the bundle image.

config/manifests/kustomization.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,3 @@ resources:
22
- ../default
33
- ../samples
44
- ../scorecard
5-
6-
patches:
7-
# Hacky way to shrink the size of FunctionMesh crd
8-
- target:
9-
kind: CustomResourceDefinition
10-
name: functionmeshes.compute.functionmesh.io
11-
patch: |-
12-
- op: remove
13-
path: /spec/validation

0 commit comments

Comments
 (0)