Skip to content

Commit 1f7d41c

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

9 files changed

Lines changed: 143 additions & 46 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,22 @@ All notable changes to this project will be documented in this file.
44

55
## [Unreleased]
66

7+
### Added
8+
9+
- 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` ([#778]).
10+
711
### Changed
812

913
- Document Helm deployed RBAC permissions and remove unnecessary permissions ([#770]).
1014
- BREAKING: `configOverrides` now only accepts the known config files (`hdfs-site.xml`,
1115
`core-site.xml`, `hadoop-policy.xml`, `ssl-server.xml`, `ssl-client.xml` and
1216
`security.properties`).
1317
Previously, arbitrary file names were silently accepted and ignored ([#777]).
14-
- Bump `stackable-operator` to 0.110.1 ([#777]).
18+
- Bump `stackable-operator` to 0.111.1 ([#777], [#778]).
1519

1620
[#770]: https://github.com/stackabletech/hdfs-operator/pull/770
1721
[#777]: https://github.com/stackabletech/hdfs-operator/pull/777
22+
[#778]: https://github.com/stackabletech/hdfs-operator/pull/778
1823

1924
## [26.3.0] - 2026-03-16
2025

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/hdfs-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
@@ -1332,8 +1332,9 @@ spec:
13321332
properties:
13331333
custom:
13341334
description: |-
1335-
Overwrite the docker image.
1336-
Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
1335+
Provide a custom container image.
1336+
1337+
Specify the full container image name, e.g. `oci.example.tech/namespace/superset:1.4.1-my-tag`
13371338
type: string
13381339
productVersion:
13391340
description: Version of the product, e.g. `1.4.1`.
@@ -1360,14 +1361,20 @@ spec:
13601361
nullable: true
13611362
type: array
13621363
repo:
1363-
description: Name of the docker repo, e.g. `oci.stackable.tech/sdp`
1364+
description: |-
1365+
The repository on the container image registry where the container image is located, e.g.
1366+
`oci.example.com/namespace`.
1367+
1368+
If not specified, the operator will use the image registry provided via the operator
1369+
environment options.
13641370
nullable: true
13651371
type: string
13661372
stackableVersion:
13671373
description: |-
13681374
Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
1369-
If not specified, the operator will use its own version, e.g. `23.4.1`.
1370-
When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.
1375+
1376+
If not specified, the operator will use its own version, e.g. `23.4.1`. When using a nightly
1377+
operator or a PR version, it will use the nightly `0.0.0-dev` image.
13711378
nullable: true
13721379
type: string
13731380
type: object

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

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,8 +1698,11 @@ pub struct HdfsClusterStatus {
16981698

16991699
#[cfg(test)]
17001700
mod test {
1701-
use stackable_operator::k8s_openapi::{
1702-
api::core::v1::ResourceRequirements, apimachinery::pkg::api::resource::Quantity,
1701+
use stackable_operator::{
1702+
k8s_openapi::{
1703+
api::core::v1::ResourceRequirements, apimachinery::pkg::api::resource::Quantity,
1704+
},
1705+
versioned::test_utils::RoundtripTestData,
17031706
};
17041707

17051708
use super::*;
@@ -2050,4 +2053,72 @@ spec:
20502053
rack_awareness
20512054
);
20522055
}
2056+
2057+
impl RoundtripTestData for v1alpha1::HdfsClusterSpec {
2058+
fn roundtrip_test_data() -> Vec<Self> {
2059+
stackable_operator::utils::yaml_from_str_singleton_map(indoc::indoc! {r#"
2060+
- image:
2061+
productVersion: 3.4.2
2062+
pullPolicy: IfNotPresent
2063+
clusterOperation:
2064+
reconciliationPaused: false
2065+
stopped: true
2066+
clusterConfig:
2067+
zookeeperConfigMapName: hdfs-zk
2068+
dfsReplication: 1
2069+
vectorAggregatorConfigMapName: vector-aggregator-discovery
2070+
authentication:
2071+
tlsSecretClass: tls
2072+
kerberos:
2073+
secretClass: kerberos
2074+
authorization:
2075+
opa:
2076+
configMapName: opa
2077+
package: hdfs
2078+
rackAwareness:
2079+
- nodeLabel: kubernetes.io/zone
2080+
- podLabel: app.kubernetes.io/role-group
2081+
nameNodes:
2082+
envOverrides:
2083+
COMMON_VAR: role-value
2084+
ROLE_VAR: role-value
2085+
config:
2086+
listenerClass: cluster-internal
2087+
resources:
2088+
cpu:
2089+
min: 250m
2090+
max: "1"
2091+
memory:
2092+
limit: 1Gi
2093+
logging:
2094+
enableVectorAgent: true
2095+
containers:
2096+
hdfs:
2097+
console:
2098+
level: INFO
2099+
roleGroups:
2100+
default:
2101+
replicas: 2
2102+
envOverrides:
2103+
COMMON_VAR: group-value
2104+
GROUP_VAR: group-value
2105+
dataNodes:
2106+
config:
2107+
listenerClass: cluster-internal
2108+
logging:
2109+
enableVectorAgent: true
2110+
roleGroups:
2111+
default:
2112+
replicas: 1
2113+
journalNodes:
2114+
config:
2115+
logging:
2116+
enableVectorAgent: true
2117+
roleGroups:
2118+
default:
2119+
replicas: 1
2120+
"#})
2121+
.expect("Failed to parse HdfsClusterSpec YAML")
2122+
}
2123+
}
20532124
}

0 commit comments

Comments
 (0)