Skip to content

chore: Bump stackable_operator to 0.93.1 #946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2025
Merged
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ All notable changes to this project will be documented in this file.
- BREAKING: Inject the vector aggregator address into the vector config using the env var `VECTOR_AGGREGATOR_ADDRESS` instead
of having the operator write it to the vector config ([#933]).
- test: Bump to Vector 0.46.1 ([#942]).
- Use versioned common structs ([#946]).

### Fixed

@@ -38,6 +39,7 @@ All notable changes to this project will be documented in this file.
[#938]: https://github.com/stackabletech/zookeeper-operator/pull/938
[#940]: https://github.com/stackabletech/zookeeper-operator/pull/940
[#942]: https://github.com/stackabletech/zookeeper-operator/pull/942
[#946]: https://github.com/stackabletech/zookeeper-operator/pull/946

## [25.3.0] - 2025-03-21

201 changes: 95 additions & 106 deletions Cargo.lock

Large diffs are not rendered by default.

600 changes: 280 additions & 320 deletions Cargo.nix

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -11,10 +11,10 @@ repository = "https://github.com/stackabletech/zookeeper-operator"

[workspace.dependencies]
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.7.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.92.0" }
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.93.1" }

anyhow = "1.0"
built = { version = "0.7", features = ["chrono", "git2"] }
built = { version = "0.8", features = ["chrono", "git2"] }
clap = "4.5"
const_format = "0.2"
fnv = "1.0"
14 changes: 7 additions & 7 deletions crate-hashes.json

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

35 changes: 19 additions & 16 deletions rust/operator-binary/src/crd/authentication.rs
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ use serde::{Deserialize, Serialize};
use snafu::{ResultExt, Snafu};
use stackable_operator::{
client::Client,
commons::authentication::{AuthenticationClass, AuthenticationClassProvider},
crd::authentication::core,
schemars::{self, JsonSchema},
versioned::versioned,
};
@@ -16,7 +16,7 @@ pub enum Error {
#[snafu(display("failed to retrieve AuthenticationClass [{}]", authentication_class))]
AuthenticationClassRetrieval {
source: stackable_operator::client::Error,
authentication_class: ObjectRef<AuthenticationClass>,
authentication_class: ObjectRef<core::v1alpha1::AuthenticationClass>,
},
// TODO: Adapt message if multiple authentication classes are supported
#[snafu(display(
@@ -27,7 +27,7 @@ pub enum Error {
"failed to use authentication method [{method}] for authentication class [{authentication_class}] - supported mechanisms: {SUPPORTED_AUTHENTICATION_CLASS:?}",
))]
AuthenticationMethodNotSupported {
authentication_class: ObjectRef<AuthenticationClass>,
authentication_class: ObjectRef<core::v1alpha1::AuthenticationClass>,
method: String,
},
}
@@ -53,15 +53,18 @@ pub mod versioned {
#[derive(Clone, Debug)]
/// Helper struct that contains resolved AuthenticationClasses to reduce network API calls.
pub struct ResolvedAuthenticationClasses {
resolved_authentication_classes: Vec<AuthenticationClass>,
resolved_authentication_classes: Vec<core::v1alpha1::AuthenticationClass>,
}

impl ResolvedAuthenticationClasses {
/// Return the (first) TLS `AuthenticationClass` if available
pub fn get_tls_authentication_class(&self) -> Option<&AuthenticationClass> {
self.resolved_authentication_classes
.iter()
.find(|auth| matches!(auth.spec.provider, AuthenticationClassProvider::Tls(_)))
pub fn get_tls_authentication_class(&self) -> Option<&core::v1alpha1::AuthenticationClass> {
self.resolved_authentication_classes.iter().find(|auth| {
matches!(
auth.spec.provider,
core::v1alpha1::AuthenticationClassProvider::Tls(_)
)
})
}

/// Validates the resolved AuthenticationClasses.
@@ -75,11 +78,11 @@ impl ResolvedAuthenticationClasses {

for auth_class in &self.resolved_authentication_classes {
match &auth_class.spec.provider {
AuthenticationClassProvider::Tls(_) => {}
AuthenticationClassProvider::Ldap(_)
| AuthenticationClassProvider::Oidc(_)
| AuthenticationClassProvider::Static(_)
| AuthenticationClassProvider::Kerberos(_) => {
core::v1alpha1::AuthenticationClassProvider::Tls(_) => {}
core::v1alpha1::AuthenticationClassProvider::Ldap(_)
| core::v1alpha1::AuthenticationClassProvider::Oidc(_)
| core::v1alpha1::AuthenticationClassProvider::Static(_)
| core::v1alpha1::AuthenticationClassProvider::Kerberos(_) => {
return Err(Error::AuthenticationMethodNotSupported {
authentication_class: ObjectRef::from_obj(auth_class),
method: auth_class.spec.provider.to_string(),
@@ -107,14 +110,14 @@ pub async fn resolve_authentication_classes(
client: &Client,
auth_classes: &Vec<v1alpha1::ZookeeperAuthentication>,
) -> Result<ResolvedAuthenticationClasses, Error> {
let mut resolved_authentication_classes: Vec<AuthenticationClass> = vec![];
let mut resolved_authentication_classes: Vec<core::v1alpha1::AuthenticationClass> = vec![];

for auth_class in auth_classes {
resolved_authentication_classes.push(
AuthenticationClass::resolve(client, &auth_class.authentication_class)
core::v1alpha1::AuthenticationClass::resolve(client, &auth_class.authentication_class)
.await
.context(AuthenticationClassRetrievalSnafu {
authentication_class: ObjectRef::<AuthenticationClass>::new(
authentication_class: ObjectRef::<core::v1alpha1::AuthenticationClass>::new(
&auth_class.authentication_class,
),
})?,
14 changes: 8 additions & 6 deletions rust/operator-binary/src/crd/security.rs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ use stackable_operator::{
},
},
client::Client,
commons::authentication::AuthenticationClassProvider,
crd::authentication::core,
k8s_openapi::api::core::v1::Volume,
time::Duration,
};
@@ -287,11 +287,13 @@ impl ZookeeperSecurity {
self.resolved_authentication_classes
.get_tls_authentication_class()
.and_then(|auth_class| match &auth_class.spec.provider {
AuthenticationClassProvider::Tls(tls) => tls.client_cert_secret_class.as_ref(),
AuthenticationClassProvider::Ldap(_)
| AuthenticationClassProvider::Oidc(_)
| AuthenticationClassProvider::Static(_)
| AuthenticationClassProvider::Kerberos(_) => None,
core::v1alpha1::AuthenticationClassProvider::Tls(tls) => {
tls.client_cert_secret_class.as_ref()
}
core::v1alpha1::AuthenticationClassProvider::Ldap(_)
| core::v1alpha1::AuthenticationClassProvider::Oidc(_)
| core::v1alpha1::AuthenticationClassProvider::Static(_)
| core::v1alpha1::AuthenticationClassProvider::Kerberos(_) => None,
})
.or(self.server_secret_class.as_ref())
}
2 changes: 1 addition & 1 deletion rust/operator-binary/src/zk_controller.rs
Original file line number Diff line number Diff line change
@@ -1053,7 +1053,7 @@ fn build_server_rolegroup_statefulset(
match_labels: Some(statefulset_match_labels.into()),
..LabelSelector::default()
},
service_name: rolegroup_ref.object_name(),
service_name: Some(rolegroup_ref.object_name()),
template: pod_template,
volume_claim_templates: Some(pvc),
..StatefulSetSpec::default()