Skip to content

Commit 76a1ac1

Browse files
Issue #407: Docs for version range support
Add docs explaining version range. Signed-off-by: Michael Ryan Peter <[email protected]>
1 parent 6cb56f7 commit 76a1ac1

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

docs/drafts/version-ranges.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Operator version ranges
2+
3+
This document explains how to specify a version range to install or update an Operator with OLM 1.0.
4+
5+
You define an Operator's target version in its custom resource (CR) file.
6+
The following list describes how OLM resolves an Operator's target version, and the resulting actions:
7+
8+
Not specifying a version in the CR
9+
: Installs or updates the latest version of the Operator.
10+
Updates are applied automatically when they are published to the catalog.
11+
12+
Specifying a version in the CR
13+
: Installs or updates the specified version.
14+
Updates are not applied automatically.
15+
If you want to update the Operator, you must manually edit the CR and apply the changes to the cluster.
16+
17+
Specifying a channel
18+
: Installs or updates the latest version of the Operator in the channel.
19+
Updates are applied automatically when they are published to the specified channel.
20+
21+
Specifying a version range in the CR
22+
: Installs or updates the latest version of the Operator within the version range.
23+
Updates that are within the specified range are automatically installed.
24+
Updates that are outside of the specified range are not installed.
25+
26+
The `spec.version` field uses the Masterminds `semver` package to enable the version range functionality.
27+
28+
OLM 1.0 does not support following methods for specifying a version range:
29+
30+
* Using tags and labels are not supported.
31+
You must use semantic versioning to define a version range.
32+
* Using [hypen range comparisons](https://github.com/Masterminds/semver#hyphen-range-comparisons) are not supported.
33+
For example, the following range option is not supported:
34+
35+
```yaml
36+
version: 3.0 - 3.6
37+
```
38+
39+
To specify a range option, use a method similar to the following example:
40+
41+
```yaml
42+
version: >=3.0 <3.6
43+
```
44+
45+
You can use the `x`, `X`, and `*` characters as wildcard characters in all comparison operations.
46+
47+
For more information about parsing, sorting, checking, and comparing version constraints, see the [Masterminds SemVer README](https://github.com/Masterminds/semver#semver).
48+
49+
## Example CRs that specify a version range

0 commit comments

Comments
 (0)