Skip to content

Commit 2f988d9

Browse files
authored
feat(operator)!: Support dynamic product image selection (#1199)
* feat(operator)!: Support dynamic product image selection * chore(operator): Add changelog entries * refactor(operator): Align code with decision This implements the decision taken in stackabletech/decisions#85 * chore(operator): Adjust changelog * fix: Bump rustls-webpki to 0.103.13 to negate RUSTSEC-2026-0104 * feat(operator): Also trim whitespace in image_name
1 parent adc92d4 commit 2f988d9

4 files changed

Lines changed: 168 additions & 48 deletions

File tree

crates/stackable-operator/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- BREAKING: Add CLI argument and env var to set the image repository used to construct final product
10+
image names: `IMAGE_REPOSITORY` (`--image-repository`), eg. `oci.example.org/my/namespace` ([#1199]).
11+
12+
### Changed
13+
14+
- BREAKING: The product image selection mechanism via `ProductImage::resolve` now takes three
15+
parameters instead of two. The new parameters are: `image_name`, `image_repository`, and
16+
`operator_version` ([#1199]).
17+
18+
[#1199]: https://github.com/stackabletech/operator-rs/pull/1199
19+
720
## [0.110.1] - 2026-04-16
821

922
### Added

crates/stackable-operator/crds/DummyCluster.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1781,8 +1781,9 @@ spec:
17811781
properties:
17821782
custom:
17831783
description: |-
1784-
Overwrite the docker image.
1785-
Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
1784+
Provide a custom container image.
1785+
1786+
Specify the full container image name, e.g. `oci.example.tech/namespace/superset:1.4.1-my-tag`
17861787
type: string
17871788
productVersion:
17881789
description: Version of the product, e.g. `1.4.1`.
@@ -1809,14 +1810,20 @@ spec:
18091810
nullable: true
18101811
type: array
18111812
repo:
1812-
description: Name of the docker repo, e.g. `oci.stackable.tech/sdp`
1813+
description: |-
1814+
The repository on the container image registry where the container image is located, e.g.
1815+
`oci.example.com/namespace`.
1816+
1817+
If not specified, the operator will use the image registry provided via the operator
1818+
environment options.
18131819
nullable: true
18141820
type: string
18151821
stackableVersion:
18161822
description: |-
18171823
Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
1818-
If not specified, the operator will use its own version, e.g. `23.4.1`.
1819-
When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.
1824+
1825+
If not specified, the operator will use its own version, e.g. `23.4.1`. When using a nightly
1826+
operator or a PR version, it will use the nightly `0.0.0-dev` image.
18201827
nullable: true
18211828
type: string
18221829
type: object

crates/stackable-operator/src/cli/environment.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@ pub struct OperatorEnvironmentOptions {
1313
/// something like `<product>-operator`.
1414
#[arg(long, env)]
1515
pub operator_service_name: String,
16+
17+
/// The image repository which should be used when resolving images provisioned by the operator.
18+
///
19+
/// This argument expects a valid registry host and path. Valid values include:
20+
/// `oci.example.org/my/namespace` or `quay.io/organization`
21+
///
22+
/// Note that when running the operator on Kubernetes we recommend to provide this value via
23+
/// the deployment mechanism, like Helm.
24+
#[arg(long, env)]
25+
pub image_repository: String,
1626
}

0 commit comments

Comments
 (0)