Skip to content

Commit 969a5f2

Browse files
Techassisbernauer
andauthored
feat: Support dynamic image repositories (#752)
* feat: Support dynamic image repositories * test: Add placeholder values to satify roundtrip tests * chore: Add changelog entry * chore: Adjust changelog * test: Add CRD roundtrip test data --------- Co-authored-by: Sebastian Bernauer <sebastian.bernauer@stackable.tech>
1 parent 8ff2b48 commit 969a5f2

9 files changed

Lines changed: 161 additions & 45 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22

33
## [Unreleased]
44

5+
### Added
6+
7+
- BREAKING: Add required CLI argument and env var to set the image repository used to construct final product image names: `IMAGE_REPOSITORY` (`--image-repository`), eg. `oci.example.org/my/namespace` ([#752]).
8+
59
### Changed
610

7-
- Document Helm deployed RBAC permissions and remove unnecessary permissions ([#745]).
11+
- Document Helm deployed RBAC permissions and remove unnecessary permissions ([#745]).
812
- BREAKING: `configOverrides` now only accepts the known config files (`hbase-site.xml`,
913
`hbase-env.sh`, `ssl-server.xml`, `ssl-client.xml` and `security.properties`).
1014
Previously, arbitrary file names were silently accepted and ignored ([#751]).
11-
- Bump `stackable-operator` to 0.110.1 and snafu to 0.9 ([#751]).
15+
- Bump `stackable-operator` to 0.111.1 and snafu to 0.9 ([#751], [#752]).
1216

1317
[#745]: https://github.com/stackabletech/hbase-operator/pull/745
1418
[#751]: https://github.com/stackabletech/hbase-operator/pull/751
19+
[#752]: https://github.com/stackabletech/hbase-operator/pull/752
1520

1621
## [26.3.0] - 2026-03-16
1722

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/hbase-operator"
1111

1212
[workspace.dependencies]
1313
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" }
14-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.110.1", features = ["crds", "webhook"] }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.111.1", features = ["crds", "webhook"] }
1515

1616
anyhow = "1.0"
1717
built = { version = "0.8", features = ["chrono", "git2"] }

crate-hashes.json

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

extra/crds.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,9 @@ spec:
145145
properties:
146146
custom:
147147
description: |-
148-
Overwrite the docker image.
149-
Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
148+
Provide a custom container image.
149+
150+
Specify the full container image name, e.g. `oci.example.tech/namespace/superset:1.4.1-my-tag`
150151
type: string
151152
productVersion:
152153
description: Version of the product, e.g. `1.4.1`.
@@ -173,14 +174,20 @@ spec:
173174
nullable: true
174175
type: array
175176
repo:
176-
description: Name of the docker repo, e.g. `oci.stackable.tech/sdp`
177+
description: |-
178+
The repository on the container image registry where the container image is located, e.g.
179+
`oci.example.com/namespace`.
180+
181+
If not specified, the operator will use the image registry provided via the operator
182+
environment options.
177183
nullable: true
178184
type: string
179185
stackableVersion:
180186
description: |-
181187
Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
182-
If not specified, the operator will use its own version, e.g. `23.4.1`.
183-
When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.
188+
189+
If not specified, the operator will use its own version, e.g. `23.4.1`. When using a nightly
190+
operator or a PR version, it will use the nightly `0.0.0-dev` image.
184191
nullable: true
185192
type: string
186193
type: object

rust/operator-binary/src/crd/mod.rs

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1371,8 +1371,11 @@ mod tests {
13711371
use indoc::indoc;
13721372
use product_config::{ProductConfigManager, types::PropertyNameKind};
13731373
use rstest::rstest;
1374-
use stackable_operator::product_config_utils::{
1375-
transform_all_roles_to_config, validate_all_roles_and_groups_config,
1374+
use stackable_operator::{
1375+
product_config_utils::{
1376+
transform_all_roles_to_config, validate_all_roles_and_groups_config,
1377+
},
1378+
versioned::test_utils::RoundtripTestData,
13761379
};
13771380

13781381
use super::*;
@@ -1543,4 +1546,91 @@ spec:
15431546
panic!("this shouldn't happen");
15441547
};
15451548
}
1549+
1550+
impl RoundtripTestData for v1alpha1::HbaseClusterSpec {
1551+
fn roundtrip_test_data() -> Vec<Self> {
1552+
stackable_operator::utils::yaml_from_str_singleton_map(indoc::indoc! {r#"
1553+
- image:
1554+
productVersion: 2.6.4
1555+
pullPolicy: IfNotPresent
1556+
clusterOperation:
1557+
reconciliationPaused: false
1558+
stopped: true
1559+
clusterConfig:
1560+
hdfsConfigMapName: test-hdfs
1561+
zookeeperConfigMapName: test-znode
1562+
vectorAggregatorConfigMapName: vector-aggregator-discovery
1563+
authentication:
1564+
tlsSecretClass: my-tls
1565+
kerberos:
1566+
secretClass: my-kerberos
1567+
authorization:
1568+
opa:
1569+
configMapName: opa
1570+
package: hbase
1571+
masters:
1572+
envOverrides:
1573+
COMMON_VAR: role-value
1574+
ROLE_VAR: role-value
1575+
config:
1576+
gracefulShutdownTimeout: 1m
1577+
resources:
1578+
cpu:
1579+
min: 250m
1580+
max: "1"
1581+
memory:
1582+
limit: 1Gi
1583+
logging:
1584+
enableVectorAgent: true
1585+
listenerClass: cluster-internal
1586+
configOverrides:
1587+
hbase-site.xml:
1588+
hbase.master.info.port: "16010"
1589+
roleGroups:
1590+
default:
1591+
replicas: 2
1592+
configOverrides:
1593+
hbase-site.xml:
1594+
hbase.master.info.port: "16011"
1595+
envOverrides:
1596+
COMMON_VAR: group-value
1597+
GROUP_VAR: group-value
1598+
regionServers:
1599+
config:
1600+
gracefulShutdownTimeout: 2m
1601+
resources:
1602+
cpu:
1603+
min: 250m
1604+
max: "2"
1605+
memory:
1606+
limit: 2Gi
1607+
logging:
1608+
enableVectorAgent: true
1609+
regionMover:
1610+
runBeforeShutdown: true
1611+
ack: true
1612+
maxThreads: 1
1613+
listenerClass: cluster-internal
1614+
roleGroups:
1615+
default:
1616+
replicas: 3
1617+
restServers:
1618+
config:
1619+
gracefulShutdownTimeout: 1m
1620+
resources:
1621+
cpu:
1622+
min: 100m
1623+
max: "1"
1624+
memory:
1625+
limit: 1Gi
1626+
logging:
1627+
enableVectorAgent: true
1628+
listenerClass: cluster-internal
1629+
roleGroups:
1630+
default:
1631+
replicas: 1
1632+
"#})
1633+
.expect("Failed to parse HbaseClusterSpec YAML")
1634+
}
1635+
}
15461636
}

0 commit comments

Comments
 (0)