Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file.

### Changed

- Bump stackable-operator to 0.114.0 ([#166]).
- Bump stackable-operator to 0.115.0 ([#166], [#171]).
- Remove the product version label from PersistentVolumeClaims ([#171]).
- All product containers now run with `securityContext.runAsNonRoot` set to `true` to improve security ([#172]).

### Fixed
Expand All @@ -16,6 +17,7 @@ All notable changes to this project will be documented in this file.
See [our internal issue](https://github.com/stackabletech/hdfs-operator/issues/626) and [the fix](https://github.com/kube-rs/kube/pull/2042) for details ([#172]).

[#166]: https://github.com/stackabletech/opensearch-operator/pull/166
[#171]: https://github.com/stackabletech/opensearch-operator/pull/171
[#172]: https://github.com/stackabletech/opensearch-operator/pull/172

## [26.7.0] - 2026-07-21
Expand Down
18 changes: 9 additions & 9 deletions Cargo.lock

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

57 changes: 29 additions & 28 deletions Cargo.nix

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ tracing = "0.1"
uuid = "1.24"

[patch."https://github.com/stackabletech/operator-rs"]
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "feat/smooth-operator/recommended-labels" }
# stackable-operator = { path = "../operator-rs/crates/stackable-operator" }
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.

5 changes: 1 addition & 4 deletions rust/operator-binary/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,7 @@ impl ValidatedCluster {
ValidatedSecurity::ManagedByApi {
tls_server_secret_class: Some(_),
..
} | ValidatedSecurity::ManagedByOperator {
tls_server_secret_class: _,
..
}
} | ValidatedSecurity::ManagedByOperator { .. }
)
}
}
Expand Down
40 changes: 10 additions & 30 deletions rust/operator-binary/src/controller/build/role_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ use stackable_operator::{
},
},
kube::api::ObjectMeta,
kvp::{
Label, Labels,
consts::{STACKABLE_VENDOR_KEY, STACKABLE_VENDOR_VALUE},
},
kvp::Labels,
v2::{
NameIsValidLabelValue,
builder::{
meta::ownerreference_from_resource, pdb::pod_disruption_budget_builder_with_role,
},
Expand Down Expand Up @@ -278,36 +274,20 @@ impl<'a> RoleBuilder<'a> {
None,
Some(true),
))
.with_labels(self.labels())
.with_labels(self.recommended_labels())
.build()
}

/// Common labels for role resources
fn labels(&self) -> Labels {
// Well-known Kubernetes labels
let mut labels = Labels::role_selector(
&self.cluster,
&self.context_names.product_name.to_label_value(),
&ValidatedCluster::role_name().to_label_value(),
)
.unwrap();

let managed_by = Label::managed_by(
self.context_names.operator_name.as_ref(),
self.context_names.controller_name.as_ref(),
fn recommended_labels(&self) -> Labels {
stackable_operator::v2::kvp::label::recommended_labels_for_role_resources(
&self.cluster.name,
&self.context_names.product_name,
&self.cluster.product_version,
&self.context_names.operator_name,
&self.context_names.controller_name,
&ValidatedCluster::role_name(),
)
.unwrap();
let version = Label::version(self.cluster.product_version.as_ref()).unwrap();

labels.insert(managed_by);
labels.insert(version);

// Stackable-specific labels
labels
.parse_insert((STACKABLE_VENDOR_KEY, STACKABLE_VENDOR_VALUE))
.unwrap();

labels
}
}

Expand Down
Loading
Loading