Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.

### Added

- 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` ([#141]).
- Support hot-reloading of security configuration files ([#130]).

### Changed
Expand All @@ -18,6 +19,7 @@ All notable changes to this project will be documented in this file.
[#129]: https://github.com/stackabletech/opensearch-operator/pull/129
[#130]: https://github.com/stackabletech/opensearch-operator/pull/130
[#137]: https://github.com/stackabletech/opensearch-operator/pull/137
[#141]: https://github.com/stackabletech/opensearch-operator/pull/141

## [26.3.0] - 2026-03-16

Expand Down
26 changes: 14 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 22 additions & 12 deletions Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ edition = "2024"
repository = "https://github.com/stackabletech/opensearch-operator"

[workspace.dependencies]
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.110.1", features = ["webhook"] }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.111.1", features = ["webhook"] }

built = { version = "0.8.0", features = ["chrono", "git2"] }
clap = "4.5"
futures = { version = "0.3", features = ["compat"] }
indoc = "2.0"
json-patch = { version = "4.2", features = ["schemars"] }
pretty_assertions = "1.4"
regex = "1.11"
Expand Down
18 changes: 9 additions & 9 deletions crate-hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 12 additions & 5 deletions extra/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1207,8 +1207,9 @@ spec:
properties:
custom:
description: |-
Overwrite the docker image.
Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
Provide a custom container image.

Specify the full container image name, e.g. `oci.example.tech/namespace/superset:1.4.1-my-tag`
type: string
productVersion:
description: Version of the product, e.g. `1.4.1`.
Expand All @@ -1235,14 +1236,20 @@ spec:
nullable: true
type: array
repo:
description: Name of the docker repo, e.g. `oci.stackable.tech/sdp`
description: |-
The repository on the container image registry where the container image is located, e.g.
`oci.example.com/namespace`.

If not specified, the operator will use the image registry provided via the operator
environment options.
nullable: true
type: string
stackableVersion:
description: |-
Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
If not specified, the operator will use its own version, e.g. `23.4.1`.
When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.

If not specified, the operator will use its own version, e.g. `23.4.1`. When using a nightly
operator or a PR version, it will use the nightly `0.0.0-dev` image.
nullable: true
type: string
type: object
Expand Down
1 change: 1 addition & 0 deletions rust/operator-binary/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ uuid.workspace = true
built.workspace = true

[dev-dependencies]
indoc.workspace = true
pretty_assertions.workspace = true
rstest.workspace = true
18 changes: 15 additions & 3 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use build::build;
use dereference::dereference;
use snafu::{ResultExt, Snafu};
use stackable_operator::{
cli::OperatorEnvironmentOptions,
cluster_resources::ClusterResourceApplyStrategy,
commons::{
affinity::StackableAffinity, networking::DomainName,
Expand Down Expand Up @@ -80,16 +81,22 @@ pub struct ContextNames {

/// The controller context
pub struct Context {
operator_environment: OperatorEnvironmentOptions,
client: stackable_operator::client::Client,
names: ContextNames,
}

impl Context {
pub fn new(client: stackable_operator::client::Client, operator_name: OperatorName) -> Self {
pub fn new(
client: stackable_operator::client::Client,
operator_environment: OperatorEnvironmentOptions,
operator_name: OperatorName,
) -> Self {
let cluster_domain_name = client.kubernetes_cluster_info.cluster_domain.clone();

Context {
client,
operator_environment,
names: Self::context_names(operator_name, cluster_domain_name),
}
}
Expand Down Expand Up @@ -454,8 +461,13 @@ pub async fn reconcile(
let preprocessed_cluster = preprocess(cluster);

// validate (no client required)
let validated_cluster = validate(&context.names, &preprocessed_cluster, &dereferenced_objects)
.context(ValidateClusterSnafu)?;
let validated_cluster = validate(
&context.names,
&context.operator_environment,
&preprocessed_cluster,
&dereferenced_objects,
)
.context(ValidateClusterSnafu)?;

// build (no client required; infallible)
let prepared_resources = build(&context.names, validated_cluster.clone());
Expand Down
Loading
Loading