Skip to content

Commit 6aa40a4

Browse files
committed
chore: Bump stackable_operator to 0.93.1
Bump stackable-operator to 0.93.0 which versions common CRD structs.
1 parent 0be2709 commit 6aa40a4

File tree

19 files changed

+460
-515
lines changed

19 files changed

+460
-515
lines changed

Cargo.lock

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

Cargo.nix

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ repository = "https://github.com/stackabletech/trino-operator"
1111

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

1616
anyhow = "1.0"
1717
async-trait = "0.1"
18-
built = { version = "0.7", features = ["chrono", "git2"] }
18+
built = { version = "0.8", features = ["chrono", "git2"] }
1919
clap = "4.5"
2020
const_format = "0.2"
2121
futures = { version = "0.3", features = ["compat"] }

crate-hashes.json

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

deploy/helm/trino-operator/crds/crds.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ spec:
3434
items:
3535
properties:
3636
authenticationClass:
37-
description: Name of the [AuthenticationClass](https://docs.stackable.tech/home/nightly/concepts/authentication) used to authenticate users.
37+
description: Name of the [AuthenticationClass](https://docs.stackable.tech/home/nightly/concepts/authentication) used to authenticate users
3838
type: string
3939
oidc:
4040
description: This field contains OIDC-specific configuration. It is only required in case OIDC is used.
@@ -45,7 +45,7 @@ spec:
4545
type: string
4646
extraScopes:
4747
default: []
48-
description: An optional list of extra scopes which get merged with the scopes defined in the [`AuthenticationClass`].
48+
description: An optional list of extra scopes which get merged with the scopes defined in the `AuthenticationClass`.
4949
items:
5050
type: string
5151
type: array

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

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ use stackable_operator::{
1515
self,
1616
pod::{PodBuilder, container::ContainerBuilder},
1717
},
18-
commons::{
19-
authentication::{AuthenticationClass, AuthenticationClassProvider},
20-
product_image_selection::ResolvedProductImage,
21-
},
18+
commons::product_image_selection::ResolvedProductImage,
19+
crd::authentication::core,
2220
k8s_openapi::api::core::v1::{Container, EnvVar, Volume, VolumeMount},
2321
kube::{ResourceExt, runtime::reflector::ObjectRef},
2422
};
@@ -49,7 +47,7 @@ pub enum Error {
4947
))]
5048
AuthenticationClassProviderNotSupported {
5149
authentication_class_provider: String,
52-
authentication_class: ObjectRef<AuthenticationClass>,
50+
authentication_class: ObjectRef<core::v1alpha1::AuthenticationClass>,
5351
},
5452

5553
#[snafu(display("Failed to format trino authentication java properties"))]
@@ -483,7 +481,7 @@ impl TryFrom<Vec<ResolvedAuthenticationClassRef>> for TrinoAuthenticationTypes {
483481
for resolved_auth_class in resolved_auth_classes {
484482
let auth_class_name = resolved_auth_class.authentication_class.name_any();
485483
match resolved_auth_class.authentication_class.spec.provider {
486-
AuthenticationClassProvider::Static(provider) => {
484+
core::v1alpha1::AuthenticationClassProvider::Static(provider) => {
487485
password_authenticators.push(TrinoPasswordAuthenticator::File(
488486
FileAuthenticator::new(auth_class_name, provider),
489487
));
@@ -493,7 +491,7 @@ impl TryFrom<Vec<ResolvedAuthenticationClassRef>> for TrinoAuthenticationTypes {
493491
TrinoAuthenticationTypeDiscriminants::Password,
494492
);
495493
}
496-
AuthenticationClassProvider::Ldap(provider) => {
494+
core::v1alpha1::AuthenticationClassProvider::Ldap(provider) => {
497495
password_authenticators.push(TrinoPasswordAuthenticator::Ldap(
498496
LdapAuthenticator::new(auth_class_name, provider),
499497
));
@@ -503,7 +501,7 @@ impl TryFrom<Vec<ResolvedAuthenticationClassRef>> for TrinoAuthenticationTypes {
503501
TrinoAuthenticationTypeDiscriminants::Password,
504502
);
505503
}
506-
AuthenticationClassProvider::Oidc(provider) => {
504+
core::v1alpha1::AuthenticationClassProvider::Oidc(provider) => {
507505
let oidc = resolved_auth_class.client_auth_options.context(
508506
OidcAuthenticationDetailsNotSpecifiedSnafu {
509507
auth_class_name: auth_class_name.clone(),
@@ -527,9 +525,10 @@ impl TryFrom<Vec<ResolvedAuthenticationClassRef>> for TrinoAuthenticationTypes {
527525
.spec
528526
.provider
529527
.to_string(),
530-
authentication_class: ObjectRef::<AuthenticationClass>::from_obj(
531-
&resolved_auth_class.authentication_class,
532-
),
528+
authentication_class:
529+
ObjectRef::<core::v1alpha1::AuthenticationClass>::from_obj(
530+
&resolved_auth_class.authentication_class,
531+
),
533532
}
534533
.fail()?,
535534
}
@@ -560,7 +559,7 @@ impl TryFrom<Vec<ResolvedAuthenticationClassRef>> for TrinoAuthenticationTypes {
560559

561560
#[cfg(test)]
562561
mod tests {
563-
use stackable_operator::commons::authentication::oidc::ClientAuthenticationOptions;
562+
use stackable_operator::crd::authentication::oidc;
564563

565564
use super::*;
566565
use crate::crd::RW_CONFIG_DIR_NAME;
@@ -660,7 +659,7 @@ mod tests {
660659
deserializer,
661660
)
662661
.unwrap(),
663-
client_auth_options: Some(ClientAuthenticationOptions {
662+
client_auth_options: Some(oidc::v1alpha1::ClientAuthenticationOptions {
664663
client_credentials_secret_ref: "my-oidc-secret".to_string(),
665664
extra_scopes: Vec::new(),
666665
product_specific_fields: (),

rust/operator-binary/src/authentication/oidc/mod.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
//!
33
44
use snafu::{ResultExt, Snafu};
5-
use stackable_operator::commons::{authentication::oidc, tls_verification::TlsClientDetailsError};
5+
use stackable_operator::{
6+
commons::tls_verification::TlsClientDetailsError, crd::authentication::oidc,
7+
};
68

79
use crate::{
810
authentication::TrinoAuthenticationConfig,
@@ -41,7 +43,7 @@ pub enum Error {
4143

4244
#[snafu(display("Failed to create OAuth2 issuer endpoint url."))]
4345
FailedToCreateIssuerEndpointUrl {
44-
source: stackable_operator::commons::authentication::oidc::Error,
46+
source: stackable_operator::crd::authentication::oidc::v1alpha1::Error,
4547
},
4648

4749
#[snafu(display("Trino does not support unverified TLS connections to OIDC"))]
@@ -59,15 +61,15 @@ pub struct TrinoOidcAuthentication {
5961
#[derive(Clone, Debug)]
6062
pub struct OidcAuthenticator {
6163
name: String,
62-
oidc: oidc::AuthenticationProvider,
64+
oidc: oidc::v1alpha1::AuthenticationProvider,
6365
client_credentials_secret: String,
6466
extra_scopes: Vec<String>,
6567
}
6668

6769
impl OidcAuthenticator {
6870
pub fn new(
6971
name: String,
70-
provider: oidc::AuthenticationProvider,
72+
provider: oidc::v1alpha1::AuthenticationProvider,
7173
client_credentials_secret: String,
7274
extra_scopes: Vec<String>,
7375
) -> Self {
@@ -112,14 +114,14 @@ impl TrinoOidcAuthentication {
112114
);
113115

114116
let (client_id_env, client_secret_env) =
115-
oidc::AuthenticationProvider::client_credentials_env_names(
117+
oidc::v1alpha1::AuthenticationProvider::client_credentials_env_names(
116118
&authenticator.client_credentials_secret,
117119
);
118120

119121
oauth2_authentication_config.add_env_vars(
120122
TrinoRole::Coordinator,
121123
crate::crd::Container::Trino,
122-
oidc::AuthenticationProvider::client_credentials_env_var_mounts(
124+
oidc::v1alpha1::AuthenticationProvider::client_credentials_env_var_mounts(
123125
authenticator.client_credentials_secret,
124126
),
125127
);
@@ -240,7 +242,7 @@ mod tests {
240242
"#
241243
);
242244
let deserializer = serde_yaml::Deserializer::from_str(&input);
243-
let oidc_auth_provider: oidc::AuthenticationProvider =
245+
let oidc_auth_provider: oidc::v1alpha1::AuthenticationProvider =
244246
serde_yaml::with::singleton_map_recursive::deserialize(deserializer).unwrap();
245247

246248
OidcAuthenticator::new(

rust/operator-binary/src/authentication/password/file.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use stackable_operator::{
1010
volume::{VolumeBuilder, VolumeMountBuilder},
1111
},
1212
},
13-
commons::{authentication::static_, product_image_selection::ResolvedProductImage},
13+
commons::product_image_selection::ResolvedProductImage,
14+
crd::authentication::r#static,
1415
k8s_openapi::api::core::v1::{Container, Volume, VolumeMount},
1516
product_logging::{self, spec::AutomaticContainerLogConfig},
1617
utils::COMMON_BASH_TRAP_FUNCTIONS,
@@ -37,11 +38,11 @@ pub enum Error {
3738
#[derive(Clone, Debug)]
3839
pub struct FileAuthenticator {
3940
name: String,
40-
file: static_::AuthenticationProvider,
41+
file: r#static::v1alpha1::AuthenticationProvider,
4142
}
4243

4344
impl FileAuthenticator {
44-
pub fn new(name: String, provider: static_::AuthenticationProvider) -> Self {
45+
pub fn new(name: String, provider: r#static::v1alpha1::AuthenticationProvider) -> Self {
4546
Self {
4647
name,
4748
file: provider,
@@ -204,7 +205,7 @@ wait_for_termination $!
204205

205206
#[cfg(test)]
206207
mod tests {
207-
use stackable_operator::commons::authentication::static_::UserCredentialsSecretRef;
208+
use stackable_operator::crd::authentication::r#static;
208209

209210
use super::*;
210211

@@ -214,8 +215,8 @@ mod tests {
214215
fn test_file_authenticator() {
215216
let authenticator = FileAuthenticator::new(
216217
AUTH_CLASS_NAME.to_string(),
217-
static_::AuthenticationProvider {
218-
user_credentials_secret: UserCredentialsSecretRef {
218+
r#static::v1alpha1::AuthenticationProvider {
219+
user_credentials_secret: r#static::v1alpha1::UserCredentialsSecretRef {
219220
name: "user_credentials".to_string(),
220221
},
221222
},

rust/operator-binary/src/authentication/password/ldap.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::collections::BTreeMap;
22

33
use snafu::{ResultExt, Snafu};
44
use stackable_operator::{
5-
commons::authentication::ldap,
5+
crd::authentication::ldap,
66
k8s_openapi::api::core::v1::{Volume, VolumeMount},
77
};
88

@@ -27,23 +27,23 @@ pub enum Error {
2727

2828
#[snafu(display("Failed to construct LDAP endpoint URL"))]
2929
LdapEndpoint {
30-
source: stackable_operator::commons::authentication::ldap::Error,
30+
source: stackable_operator::crd::authentication::ldap::v1alpha1::Error,
3131
},
3232

3333
#[snafu(display("Failed to construct LDAP Volumes and VolumeMounts"))]
3434
LdapVolumeAndVolumeMounts {
35-
source: stackable_operator::commons::authentication::ldap::Error,
35+
source: stackable_operator::crd::authentication::ldap::v1alpha1::Error,
3636
},
3737
}
3838

3939
#[derive(Clone, Debug)]
4040
pub struct LdapAuthenticator {
4141
name: String,
42-
ldap: ldap::AuthenticationProvider,
42+
ldap: ldap::v1alpha1::AuthenticationProvider,
4343
}
4444

4545
impl LdapAuthenticator {
46-
pub fn new(name: String, provider: ldap::AuthenticationProvider) -> Self {
46+
pub fn new(name: String, provider: ldap::v1alpha1::AuthenticationProvider) -> Self {
4747
Self {
4848
name,
4949
ldap: provider,
@@ -161,8 +161,9 @@ mod tests {
161161
const LDAP_SEARCH_BASE: &str = "ou=users,dc=example,dc=org";
162162

163163
fn setup_test_authenticator() -> LdapAuthenticator {
164-
let auth_provider = serde_yaml::from_str::<ldap::AuthenticationProvider>(&format!(
165-
r#"
164+
let auth_provider =
165+
serde_yaml::from_str::<ldap::v1alpha1::AuthenticationProvider>(&format!(
166+
r#"
166167
hostname: {LDAP_HOST_NAME}
167168
searchBase: {LDAP_SEARCH_BASE}
168169
bindCredentials:
@@ -173,8 +174,8 @@ mod tests {
173174
caCert:
174175
secretClass: {TLS_SECRET_CLASS_NAME}
175176
"#
176-
))
177-
.unwrap();
177+
))
178+
.unwrap();
178179

179180
LdapAuthenticator::new(AUTH_CLASS_NAME.to_string(), auth_provider)
180181
}

rust/operator-binary/src/authentication/password/mod.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,7 @@ impl TrinoPasswordAuthentication {
203203

204204
#[cfg(test)]
205205
mod tests {
206-
use stackable_operator::commons::authentication::{
207-
ldap, static_, static_::UserCredentialsSecretRef,
208-
};
206+
use stackable_operator::crd::authentication::{ldap, r#static};
209207

210208
use super::*;
211209

@@ -214,8 +212,8 @@ mod tests {
214212
const LDAP_AUTH_CLASS_1: &str = "ldap-auth-1";
215213
const LDAP_AUTH_CLASS_2: &str = "ldap-auth-2";
216214

217-
fn ldap_provider() -> ldap::AuthenticationProvider {
218-
serde_yaml::from_str::<ldap::AuthenticationProvider>(
215+
fn ldap_provider() -> ldap::v1alpha1::AuthenticationProvider {
216+
serde_yaml::from_str::<ldap::v1alpha1::AuthenticationProvider>(
219217
"
220218
hostname: my-ldap
221219
",
@@ -227,16 +225,16 @@ mod tests {
227225
let authenticators = vec![
228226
TrinoPasswordAuthenticator::File(FileAuthenticator::new(
229227
FILE_AUTH_CLASS_1.to_string(),
230-
static_::AuthenticationProvider {
231-
user_credentials_secret: UserCredentialsSecretRef {
228+
r#static::v1alpha1::AuthenticationProvider {
229+
user_credentials_secret: r#static::v1alpha1::UserCredentialsSecretRef {
232230
name: FILE_AUTH_CLASS_1.to_string(),
233231
},
234232
},
235233
)),
236234
TrinoPasswordAuthenticator::File(FileAuthenticator::new(
237235
FILE_AUTH_CLASS_2.to_string(),
238-
static_::AuthenticationProvider {
239-
user_credentials_secret: UserCredentialsSecretRef {
236+
r#static::v1alpha1::AuthenticationProvider {
237+
user_credentials_secret: r#static::v1alpha1::UserCredentialsSecretRef {
240238
name: FILE_AUTH_CLASS_2.to_string(),
241239
},
242240
},
@@ -283,8 +281,8 @@ mod tests {
283281
fn test_password_authentication_config_files() {
284282
let file_auth_1 = FileAuthenticator::new(
285283
FILE_AUTH_CLASS_1.to_string(),
286-
static_::AuthenticationProvider {
287-
user_credentials_secret: UserCredentialsSecretRef {
284+
r#static::v1alpha1::AuthenticationProvider {
285+
user_credentials_secret: r#static::v1alpha1::UserCredentialsSecretRef {
288286
name: FILE_AUTH_CLASS_1.to_string(),
289287
},
290288
},

rust/operator-binary/src/catalog/commons.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ use snafu::{OptionExt, ResultExt, ensure};
33
use stackable_operator::{
44
builder::pod::volume::{VolumeBuilder, VolumeMountBuilder},
55
client::Client,
6-
commons::{
7-
s3::{S3AccessStyle, S3ConnectionInlineOrReference},
8-
tls_verification::{CaCert, TlsServerVerification, TlsVerification},
9-
},
6+
commons::tls_verification::{CaCert, TlsServerVerification, TlsVerification},
7+
crd::s3,
108
k8s_openapi::api::core::v1::ConfigMap,
119
};
1210

@@ -75,7 +73,7 @@ impl ExtendCatalogConfig for MetastoreConnection {
7573
}
7674

7775
#[async_trait]
78-
impl ExtendCatalogConfig for S3ConnectionInlineOrReference {
76+
impl ExtendCatalogConfig for s3::v1alpha1::InlineConnectionOrReference {
7977
async fn extend_catalog_config(
8078
&self,
8179
catalog_config: &mut CatalogConfig,
@@ -117,7 +115,7 @@ impl ExtendCatalogConfig for S3ConnectionInlineOrReference {
117115
catalog_config.add_property(region_prop, &s3.region.name);
118116
catalog_config.add_property(
119117
path_style_prop,
120-
(s3.access_style == S3AccessStyle::Path).to_string(),
118+
(s3.access_style == s3::v1alpha1::S3AccessStyle::Path).to_string(),
121119
);
122120

123121
if let Some((access_key, secret_key)) = s3.credentials_mount_paths() {

0 commit comments

Comments
 (0)