@@ -12,8 +12,8 @@ use stackable_operator::{
1212use crate :: {
1313 controller:: { KAFKA_CONTROLLER_NAME , ValidatedKafkaCluster , ValidatedRoleGroupConfig } ,
1414 crd:: {
15- JVM_SECURITY_PROPERTIES_FILE , KafkaPodDescriptor , MetadataManager ,
16- STACKABLE_LISTENER_BOOTSTRAP_DIR , STACKABLE_LISTENER_BROKER_DIR ,
15+ JVM_SECURITY_PROPERTIES_FILE , MetadataManager , STACKABLE_LISTENER_BOOTSTRAP_DIR ,
16+ STACKABLE_LISTENER_BROKER_DIR ,
1717 listener:: { KafkaListenerConfig , node_address_cmd} ,
1818 role:: AnyConfig ,
1919 v1alpha1,
@@ -66,6 +66,9 @@ pub enum Error {
6666
6767 #[ snafu( display( "failed to build jaas configuration file for {rolegroup}" ) ) ]
6868 BuildJaasConfig { rolegroup : String } ,
69+
70+ #[ snafu( display( "failed to build pod descriptors" ) ) ]
71+ BuildPodDescriptors { source : crate :: crd:: Error } ,
6972}
7073
7174/// The rolegroup [`ConfigMap`] configures the rolegroup based on the configuration given by the administrator
@@ -75,7 +78,6 @@ pub fn build_rolegroup_config_map(
7578 rolegroup : & RoleGroupRef < v1alpha1:: KafkaCluster > ,
7679 validated_rg : & ValidatedRoleGroupConfig ,
7780 listener_config : & KafkaListenerConfig ,
78- pod_descriptors : & [ KafkaPodDescriptor ] ,
7981) -> Result < ConfigMap , Error > {
8082 let kafka_security = & validated_cluster. kafka_security ;
8183 let resolved_product_image = & validated_cluster. image ;
@@ -87,6 +89,14 @@ pub fn build_rolegroup_config_map(
8789 . as_ref ( )
8890 . map ( |auth_config| auth_config. opa_connect . clone ( ) ) ;
8991
92+ let pod_descriptors = & kafka
93+ . pod_descriptors (
94+ None ,
95+ & validated_cluster. kubernetes_cluster_info ,
96+ validated_cluster. kafka_security . client_port ( ) ,
97+ )
98+ . context ( BuildPodDescriptorsSnafu ) ?;
99+
90100 let metadata_manager = kafka
91101 . effective_metadata_manager ( )
92102 . context ( InvalidMetadataManagerSnafu ) ?;
0 commit comments