-
Notifications
You must be signed in to change notification settings - Fork 261
Description
Context
I am using the opm alpha render-veneer semver command to generate a catalog from the following veneer:
Schema: olm.semver
GenerateMajorChannels: false
GenerateMinorChannels: true
Candidate:
Bundles: []
Fast:
Bundles: []
Stable:
Bundles:
- Image: docker.io/example/foo:v0.1.0
- Image: docker.io/example/foo:v0.1.1
- Image: docker.io/example/foo:v0.2.0
- Image: docker.io/example/foo:v1.0.0Note that the actual image names were replaced. The bundles are generated using the following command (no default channel set):
generate bundle -q --overwrite --package=$(PACKAGE_NAME) --version $(VERSION) ...The output is the following:
---
defaultChannel: stable-v1.0
name: foo
schema: olm.package
---
entries:
- name: foo.v0.1.0
- name: foo.v0.1.1
skips:
- foo.v0.1.0
name: stable-v0.1
package: foo
schema: olm.channel
---
entries:
- name: foo.v0.2.0
name: stable-v0.2
package: foo
schema: olm.channel
---
entries:
- name: foo.v1.0.0
name: stable-v1.0
package: foo
schema: olm.channel
---Versions:
> opm version
Version: version.Version{OpmVersion:"v1.26.2", GitCommit:"0e53cafe", BuildDate:"2022-09-21T15:25:25Z", GoOs:"darwin", GoArch:"arm64"}
> operator-sdk version
operator-sdk version: "v1.24.0", commit: "de6a14d03de3c36dcc9de3891af788b49d15f0f3", kubernetes version: "1.24.2", go version: "go1.18.6", GOOS: "darwin", GOARCH: "amd64"
Problem
As you can see in the output above, there is no replaces directive between minor channels. I am expecting e.g. stable-v0.2 to have:
entries:
- name: foo.v0.2.0
replaces: foo.v0.1.1. # <-- this is missing
name: stable-v0.2
package: foo
schema: olm.channelThis replaces is however present in the docs:
entries:
- name: testoperator.v1.1.0
replaces: testoperator.v1.0.1
name: candidate-v1.1
package: testoperator
schema: olm.channelWithout this directive, when the Subscription is updated from stable-v0.1 to. stable-v0.2 (and the operator is installed at version 0.1.1), OLM doesn't see nor performs the upgrade. The only way is to uninstall and then reinstall.
I understood that this is a feature for major channels, as hinted by:
Please note that at no time do we transgress across major-version boundaries with the channels, to be consistent with the semver convention for major versions, where the purpose is to make incompatible API changes.
But for minor versions the upgrade should be automatic when switching channels.