diff --git a/alpha/template/composite/builder_test.go b/alpha/template/composite/builder_test.go index 8835c42a9..beaab810b 100644 --- a/alpha/template/composite/builder_test.go +++ b/alpha/template/composite/builder_test.go @@ -715,12 +715,12 @@ func TestSemverBuilder(t *testing.T) { } const semverYaml = `--- -Schema: olm.semver -GenerateMajorChannels: true -GenerateMinorChannels: true -Stable: - Bundles: - - Image: quay.io/olmtest/webhook-operator-bundle:0.0.3 +schema: olm.semver +generateMajorChannels: true +generateMinorChannels: true +stable: + bundles: + - image: quay.io/olmtest/webhook-operator-bundle:0.0.3 ` const semverBuiltFbcYaml = `--- diff --git a/alpha/template/semver/README.md b/alpha/template/semver/README.md index ace33746a..c691cb5ff 100644 --- a/alpha/template/semver/README.md +++ b/alpha/template/semver/README.md @@ -15,42 +15,42 @@ The `semver template` must have: The resulting FBC must clearly indicate how generated channels relate to template entities ### Schema Anatomy -For convenience and simplicity, this template currently supports hard-coded channel names `Candidate`, `Fast`, and `Stable`, in order of increasing channel stability. We leverage this relationship to calculate the default channel for the package. +For convenience and simplicity, this template currently supports hard-coded channel names `candidate`, `fast`, and `stable`, in order of increasing channel stability. We leverage this relationship to calculate the default channel for the package. -`GenerateMajorChannels` and `GenerateMinorChannels` dictate whether this template will generate X-stream or Y-stream channels (attributes can be set independently). If omitted, only minor (Y-stream) channels will be generated. +`generateMajorChannels` and `generateMinorChannels` dictate whether this template will generate X-stream or Y-stream channels (attributes can be set independently). If omitted, only minor (Y-stream) channels will be generated. Under each channel are a list of bundle image references which contribute to that channel. With the following (hypothetical) example we define a mock bundle which has 11 versions, represented across each of the channel types: ```yaml -Schema: olm.semver -GenerateMajorChannels: true -GenerateMinorChannels: true -Candidate: - Bundles: - - Image: quay.io/foo/olm:testoperator.v0.1.0 - - Image: quay.io/foo/olm:testoperator.v0.1.1 - - Image: quay.io/foo/olm:testoperator.v0.1.2 - - Image: quay.io/foo/olm:testoperator.v0.1.3 - - Image: quay.io/foo/olm:testoperator.v0.2.0 - - Image: quay.io/foo/olm:testoperator.v0.2.1 - - Image: quay.io/foo/olm:testoperator.v0.2.2 - - Image: quay.io/foo/olm:testoperator.v0.3.0 - - Image: quay.io/foo/olm:testoperator.v1.0.0 - - Image: quay.io/foo/olm:testoperator.v1.0.1 - - Image: quay.io/foo/olm:testoperator.v1.1.0 -Fast: - Bundles: - - Image: quay.io/foo/olm:testoperator.v0.2.1 - - Image: quay.io/foo/olm:testoperator.v0.2.2 - - Image: quay.io/foo/olm:testoperator.v0.3.0 - - Image: quay.io/foo/olm:testoperator.v1.0.1 - - Image: quay.io/foo/olm:testoperator.v1.1.0 -Stable: - Bundles: - - Image: quay.io/foo/olm:testoperator.v1.0.1 +schema: olm.semver +generateMajorChannels: true +generateMinorChannels: true +candidate: + bundles: + - image: quay.io/foo/olm:testoperator.v0.1.0 + - image: quay.io/foo/olm:testoperator.v0.1.1 + - image: quay.io/foo/olm:testoperator.v0.1.2 + - image: quay.io/foo/olm:testoperator.v0.1.3 + - image: quay.io/foo/olm:testoperator.v0.2.0 + - image: quay.io/foo/olm:testoperator.v0.2.1 + - image: quay.io/foo/olm:testoperator.v0.2.2 + - image: quay.io/foo/olm:testoperator.v0.3.0 + - image: quay.io/foo/olm:testoperator.v1.0.0 + - image: quay.io/foo/olm:testoperator.v1.0.1 + - image: quay.io/foo/olm:testoperator.v1.1.0 +fast: + bundles: + - image: quay.io/foo/olm:testoperator.v0.2.1 + - image: quay.io/foo/olm:testoperator.v0.2.2 + - image: quay.io/foo/olm:testoperator.v0.3.0 + - image: quay.io/foo/olm:testoperator.v1.0.1 + - image: quay.io/foo/olm:testoperator.v1.1.0 +stable: + bundles: + - image: quay.io/foo/olm:testoperator.v1.0.1 ``` -In this example, `Candidate` has the entire version range of bundles, `Fast` has a mix of older and more-recent versions, and `Stable` channel only has a single published entry. +In this example, `candidate` has the entire version range of bundles, `fast` has a mix of older and more-recent versions, and `stable` channel only has a single published entry. ### CLI Tool Usage ``` @@ -85,7 +85,7 @@ Note that if the command is called without a file argument and nothing passed in the command will hang indefinitely. Either a file argument or file information passed in on standard input is required by the command. -With the template attribute `GenerateMajorChannels: true` resulting major channels from the command are (filtering out `olm.bundle` content): +With the template attribute `generateMajorChannels: true` resulting major channels from the command are (filtering out `olm.bundle` content): ```yaml --- defaultChannel: stable-v1 @@ -165,10 +165,10 @@ package: testoperator schema: olm.channel ``` -We generated a channel for each template channel entity corresponding to each of the 0.\#.\#, 1.\#.\# major version ranges with skips to the head of the highest semver in a channel. We also generated a replaces edge to traverse across minor version transitions within each major channel. Finally, we generated an `olm.package` object, setting as default the most-stable channel head we created. This process will prefer `Stable` channel over `Fast`, over `Candidate` and then a higher bundle version over a lower version. +We generated a channel for each template channel entity corresponding to each of the 0.\#.\#, 1.\#.\# major version ranges with skips to the head of the highest semver in a channel. We also generated a replaces edge to traverse across minor version transitions within each major channel. Finally, we generated an `olm.package` object, setting as default the most-stable channel head we created. This process will prefer `stable` channel over `fast`, over `candidate` and then a higher bundle version over a lower version. (Please note that the naming of the generated channels indicates the digits of significance for that channel. For example, `fast-v1` is a decomposed channel of the `fast` type which contains only major versions of contributing bundles matching `v1`.) -For contrast, with the template attribute `GenerateMinorChannels: true` and running the command again (again skipping rendered bundle image output) we get a bunch more channels: +For contrast, with the template attribute `generateMinorChannels: true` and running the command again (again skipping rendered bundle image output) we get a bunch more channels: ```yaml --- defaultChannel: stable-v1.0 @@ -278,9 +278,7 @@ Here, a channel is generated for each template channel which differs by minor ve ### DEMOS #### Major Channel Generation -![`GenerateMajorChannels`](./major-version-demo.gif) +![`generateMajorChannels`](./major-version-demo.gif) #### Minor Channel Generation -![`GenerateMinorChannels`](./minor-version-demo.gif) - - +![`generateMinorChannels`](./minor-version-demo.gif)