You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[File-based-catalogs][file-based-catalog-spec] (FBC) and [catalog templates][templates-doc] (templates) provide operator authors with standardized schemas to express operator upgrade graphs. However, without explicit tooling users require clear examples of how to achieve routine goals. This document is an attempt to establish a formulary of common operations, specifically with the intention of making these pieces automatable. This is in no way an exhaustive list.
9
9
10
10
## Conventions
11
-
Formulae will be identified as pertaining to either FBC or [semver catalog template][semver-template-doc] (semver template). Since FBC and the [basic catalog template][basic-template-doc] (basic template) both represent the upgrade graph in the set of `olm.channel` objects, instructions for FBC will also be applicable to the `basic template`. Manipulations of `olm.bundle` attributes are limited to FBC representation only.
11
+
Formulae will be identified as FBC, [basic catalog template][basic-template-doc] (basic template), or [semver catalog template][semver-template-doc] (semver template).
12
12
Schema manipulations will be modeled using YAML and [yq][yq]. Wherever possible, example input will be limited to the relevant object hierarchies. Truncation is indicated by elipses (...) before and after the text.
13
13
14
-
15
14
## Examples
16
15
For brevity, all formulae will refer to the same example, for semver template and FBC. For convenience, all semver bundle image pullspecs will express versions which match the bundle version (instead of SHAs).
17
16
18
-
### semver template example
19
-
Formulae presume the following content is saved to the file `semver.yaml`
20
-
```yaml
21
-
schema: olm.semver
22
-
generateMajorChannels: false
23
-
generateMinorChannels: true
24
-
candidate:
25
-
bundles:
26
-
- image: quay.io/organization/testoperator:v1.0.0
27
-
- image: quay.io/organization/testoperator:v1.0.1
28
-
- image: quay.io/organization/testoperator:v1.1.0
29
-
fast:
30
-
bundles:
31
-
- image: quay.io/organization/testoperator:v1.0.1
32
-
- image: quay.io/organization/testoperator:v1.1.0
33
-
stable:
34
-
bundles:
35
-
- image: quay.io/organization/testoperator:v1.0.1
36
-
```
37
-
38
-
39
17
### FBC example
40
18
Formulae presume the following content is saved to the file `fbc.yaml`
41
19
@@ -84,28 +62,54 @@ schema: olm.channel
84
62
```
85
63
86
64
87
-
## Formulae
88
-
89
-
### Adding a new bundle to an existing channel
90
-
#### semver
91
-
Add a new `testoperatorv1.1.1` bundle pullspec to the `Candidate` channel archetype
### Adding a new 'replaces' link between two existing bundles
193
+
{{% alert title="Note" color="info" %}}
194
+
This operation is not possible for the semver template, which exclusively leverages semver ordering to generate an opinonated upgrade graph.
195
+
{{% /alert %}}
145
196
146
197
#### FBC
147
198
Adding a new `testoperator.v1.1.1` bundle version edge with a replaces link to its predecessor `testoperator.v1.1.0` version which already exists in the channel.
@@ -166,8 +217,34 @@ schema: olm.channel
166
217
...
167
218
```
168
219
220
+
#### basic
221
+
Adding a new `testoperator.v0.1.1` bundle version edge with a replaces link to its predecessor `testoperator.v0.1.0` version which already exists in the channel.
This operation is not possible for the semver template, which exclusively leverages semver ordering to generate an opinonated upgrade graph.
247
+
{{% /alert %}}
171
248
172
249
#### FBC
173
250
Remove the upgrade edge from the example `candidate-v1.1` channel which refers to bundle version `testoperator.v1.1.0`.
@@ -190,34 +267,27 @@ schema: olm.channel
190
267
Please note that removing the only edge for a channel as in this example will yield an explicitly empty array. This will produce an error in `opm validate`.
191
268
{{% /alert %}}
192
269
193
-
### Substituting a bundle version in the upgrade graph
194
-
195
-
#### semver
196
-
For all channels, replace instances of `quay.io/organization/testoperator:v1.1.0` with `quay.io/organization/testoperator:v1.1.0-CVE`
270
+
#### basic
271
+
Remove the upgrade edge from the example `stable` channel which refers to bundle version `testoperator.v0.2.0`.
197
272
198
273
```bash
199
-
yq '(..| select(has("image") and .image == "quay.io/organization/testoperator:v1.1.0")).image = "quay.io/organization/testoperator:v1.1.0-cve"' semver.yaml
Copy file name to clipboardExpand all lines: content/en/docs/advanced-tasks/ship-operator-supporting-multiarch.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ labels:
16
16
operatorframework.io/os.<GOOS>: supported
17
17
```
18
18
19
-
Where `<GOARCH>` and `<GOOS>` are one of the values [listed here](https://github.com/golang/go/blob/master/src/go/build/syslist.go).
19
+
Where `<GOARCH>` and `<GOOS>` are one of the values [listed here](https://github.com/golang/go/blob/master/src/internal/syslist/syslist.go).
0 commit comments