@@ -5,6 +5,7 @@ use stackable_operator::{
55 commons:: authentication:: { AuthenticationClass , AuthenticationClassProvider } ,
66 schemars:: { self , JsonSchema } ,
77} ;
8+ use stackable_versioned:: versioned;
89
910use crate :: crd:: ObjectRef ;
1011
@@ -29,19 +30,22 @@ pub enum Error {
2930 } ,
3031}
3132
32- #[ derive( Clone , Deserialize , Debug , Eq , JsonSchema , PartialEq , Serialize ) ]
33- #[ serde( rename_all = "camelCase" ) ]
34- pub struct ZookeeperAuthentication {
35- /// The [AuthenticationClass](https://docs.stackable.tech/home/stable/concepts/authentication) to use.
36- ///
37- /// ## mTLS
38- ///
39- /// Only affects client connections. This setting controls:
40- /// - If clients need to authenticate themselves against the server via TLS
41- /// - Which ca.crt to use when validating the provided client certs
42- ///
43- /// This will override the server TLS settings (if set) in `spec.clusterConfig.tls.serverSecretClass`.
44- pub authentication_class : String ,
33+ #[ versioned( version( name = "v1alpha1" ) ) ]
34+ pub mod versioned {
35+ #[ derive( Clone , Deserialize , Debug , Eq , JsonSchema , PartialEq , Serialize ) ]
36+ #[ serde( rename_all = "camelCase" ) ]
37+ pub struct ZookeeperAuthentication {
38+ /// The [AuthenticationClass](https://docs.stackable.tech/home/stable/concepts/authentication) to use.
39+ ///
40+ /// ## mTLS
41+ ///
42+ /// Only affects client connections. This setting controls:
43+ /// - If clients need to authenticate themselves against the server via TLS
44+ /// - Which ca.crt to use when validating the provided client certs
45+ ///
46+ /// This will override the server TLS settings (if set) in `spec.clusterConfig.tls.serverSecretClass`.
47+ pub authentication_class : String ,
48+ }
4549}
4650
4751#[ derive( Clone , Debug ) ]
@@ -99,7 +103,7 @@ impl ResolvedAuthenticationClasses {
99103/// - Validation failed
100104pub async fn resolve_authentication_classes (
101105 client : & Client ,
102- auth_classes : & Vec < ZookeeperAuthentication > ,
106+ auth_classes : & Vec < v1alpha1 :: ZookeeperAuthentication > ,
103107) -> Result < ResolvedAuthenticationClasses , Error > {
104108 let mut resolved_authentication_classes: Vec < AuthenticationClass > = vec ! [ ] ;
105109
0 commit comments