Skip to content

Commit bba6907

Browse files
committed
feat: Support autoUpdate in product image selection
1 parent f6ec283 commit bba6907

6 files changed

Lines changed: 178 additions & 40 deletions

File tree

Cargo.lock

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/stackable-operator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ product-config.workspace = true
4444
rand.workspace = true
4545
regex.workspace = true
4646
schemars.workspace = true
47-
semver.workspace = true
47+
semver = { workspace = true, features = ["serde"] }
4848
serde_json.workspace = true
4949
serde_yaml.workspace = true
5050
serde.workspace = true

crates/stackable-operator/crds/DummyCluster.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1831,6 +1831,27 @@ spec:
18311831
Consult the [Product image selection documentation](https://docs.stackable.tech/home/nightly/concepts/product_image_selection)
18321832
for details.
18331833
properties:
1834+
autoUpdate:
1835+
default: false
1836+
description: |-
1837+
Automatically update the product image. Defaults to `false`.
1838+
1839+
This mechanism utilizes a floating image tag which always refers to the latest patch version
1840+
in the current release line. The current release line is either automatically derived, or
1841+
can be overridden via `stackableVersion`.
1842+
1843+
It should be noted that when this field is set to `true`, the operator uses `Always` as the
1844+
pull policy for product images. If set to `false`, `IfNotPresent` is used. Explicitly
1845+
setting `pullPolicy` takes precedence.
1846+
1847+
### Examples
1848+
1849+
- The `stackableVersion` field is not set, the operator falls back to its own version, eg.
1850+
26.7.0. If this field is set to `true`, the `26.7` floating tag will be used for product
1851+
images, else, `26.7.0` will be used.
1852+
- The `stackableVersion` field is set to `26.3.0`. If this field is set to `true`, the
1853+
`26.3` floating tag will be used for product images, else, `26.3.0` will be used.
1854+
type: boolean
18341855
custom:
18351856
description: |-
18361857
Provide a custom container image.
@@ -1841,12 +1862,13 @@ spec:
18411862
description: Version of the product, e.g. `1.4.1`.
18421863
type: string
18431864
pullPolicy:
1844-
default: Always
18451865
description: '[Pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy) used when pulling the image.'
18461866
enum:
18471867
- IfNotPresent
18481868
- Always
18491869
- Never
1870+
- null
1871+
nullable: true
18501872
type: string
18511873
pullSecrets:
18521874
description: '[Image pull secrets](https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod) to pull images from a private registry.'
@@ -1872,9 +1894,9 @@ spec:
18721894
type: string
18731895
stackableVersion:
18741896
description: |-
1875-
Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
1897+
Stackable version of the product, e.g. `26.7.0` or `0.0.0-dev`.
18761898
1877-
If not specified, the operator will use its own version, e.g. `23.4.1`. When using a nightly
1899+
If not specified, the operator will use its own version, e.g. `26.7.1`. When using a nightly
18781900
operator or a PR version, it will use the nightly `0.0.0-dev` image.
18791901
nullable: true
18801902
type: string

0 commit comments

Comments
 (0)