@@ -19,28 +19,21 @@ use stackable_operator::{
1919 } ,
2020 } ,
2121 } ,
22- client:: Client ,
2322 commons:: secret_class:: SecretClassVolumeProvisionParts ,
2423 crd:: authentication:: core,
2524 k8s_openapi:: api:: core:: v1:: Volume ,
2625 shared:: time:: Duration ,
2726} ;
2827
2928use crate :: {
30- crd:: {
31- authentication:: { self , ResolvedAuthenticationClasses } ,
32- tls, v1alpha1,
33- } ,
29+ crd:: { authentication:: ResolvedAuthenticationClasses , tls, v1alpha1} ,
3430 zk_controller:: LISTENER_VOLUME_NAME ,
3531} ;
3632
3733type Result < T , E = Error > = std:: result:: Result < T , E > ;
3834
3935#[ derive( Snafu , Debug ) ]
4036pub enum Error {
41- #[ snafu( display( "failed to process authentication class" ) ) ]
42- InvalidAuthenticationClassConfiguration { source : authentication:: Error } ,
43-
4437 #[ snafu( display( "failed to build TLS volume for {volume_name:?}" ) ) ]
4538 BuildTlsVolume {
4639 source : SecretOperatorVolumeSourceBuilderError ,
@@ -96,21 +89,6 @@ impl ZookeeperSecurity {
9689 pub const STORE_PASSWORD_ENV : & ' static str = "STORE_PASSWORD" ;
9790 pub const SYSTEM_TRUST_STORE_DIR : & ' static str = "/etc/pki/java/cacerts" ;
9891
99- /// Create a `ZookeeperSecurity` struct from the Zookeeper custom resource and resolve
100- /// all provided `AuthenticationClass` references.
101- pub async fn new_from_zookeeper_cluster (
102- client : & Client ,
103- zk : & v1alpha1:: ZookeeperCluster ,
104- ) -> Result < Self , Error > {
105- let resolved_authentication_classes = authentication:: resolve_authentication_classes (
106- client,
107- & zk. spec . cluster_config . authentication ,
108- )
109- . await
110- . context ( InvalidAuthenticationClassConfigurationSnafu ) ?;
111- Ok ( Self :: new ( zk, resolved_authentication_classes) )
112- }
113-
11492 /// Build a `ZookeeperSecurity` from a [`v1alpha1::ZookeeperCluster`] and already-resolved
11593 /// [`ResolvedAuthenticationClasses`]. Synchronous; intended to be called from the validate
11694 /// step of the controllers.
0 commit comments