@@ -27,7 +27,7 @@ use stackable_operator::{
2727 } ,
2828 kvp:: Labels ,
2929 logging:: controller:: ReconcilerError ,
30- role_utils:: { GenericRoleConfig , RoleGroupRef } ,
30+ role_utils:: GenericRoleConfig ,
3131 shared:: time:: Duration ,
3232 status:: condition:: {
3333 compute_conditions, operations:: ClusterOperationsConditionBuilder ,
@@ -437,22 +437,22 @@ pub enum Error {
437437 source : stackable_operator:: cluster_resources:: Error ,
438438 } ,
439439
440- #[ snafu( display( "failed to apply Service for {}" , rolegroup ) ) ]
440+ #[ snafu( display( "failed to apply Service for role group {role_group}" ) ) ]
441441 ApplyRoleGroupService {
442442 source : stackable_operator:: cluster_resources:: Error ,
443- rolegroup : RoleGroupRef < v1alpha1 :: KafkaCluster > ,
443+ role_group : RoleGroupName ,
444444 } ,
445445
446- #[ snafu( display( "failed to apply ConfigMap for {}" , rolegroup ) ) ]
446+ #[ snafu( display( "failed to apply ConfigMap for role group {role_group}" ) ) ]
447447 ApplyRoleGroupConfig {
448448 source : stackable_operator:: cluster_resources:: Error ,
449- rolegroup : RoleGroupRef < v1alpha1 :: KafkaCluster > ,
449+ role_group : RoleGroupName ,
450450 } ,
451451
452- #[ snafu( display( "failed to apply StatefulSet for {}" , rolegroup ) ) ]
452+ #[ snafu( display( "failed to apply StatefulSet for role group {role_group}" ) ) ]
453453 ApplyRoleGroupStatefulSet {
454454 source : stackable_operator:: cluster_resources:: Error ,
455- rolegroup : RoleGroupRef < v1alpha1 :: KafkaCluster > ,
455+ role_group : RoleGroupName ,
456456 } ,
457457
458458 #[ snafu( display( "failed to build discovery ConfigMap" ) ) ]
@@ -605,10 +605,6 @@ pub async fn reconcile_kafka(
605605
606606 for ( kafka_role, rg_map) in & validated_cluster. role_group_configs {
607607 for ( rolegroup_name, validated_rg) in rg_map {
608- // `rolegroup_ref` is a v1 `RoleGroupRef` retained only for the error context of the
609- // per-rolegroup apply calls below. All other identification uses the typed
610- // `kafka_role` / `rolegroup_name` (and `ValidatedCluster::resource_names`).
611- let rolegroup_ref = kafka. rolegroup_ref ( kafka_role, rolegroup_name. to_string ( ) ) ;
612608 // The Vector agent config is the static `vector.yaml`, added to the rolegroup
613609 // ConfigMap only when the Vector agent is enabled (resolved during validation).
614610 let vector_config = validated_rg
@@ -682,19 +678,19 @@ pub async fn reconcile_kafka(
682678 . add ( client, rg_headless_service)
683679 . await
684680 . with_context ( |_| ApplyRoleGroupServiceSnafu {
685- rolegroup : rolegroup_ref . clone ( ) ,
681+ role_group : rolegroup_name . clone ( ) ,
686682 } ) ?;
687683 cluster_resources
688684 . add ( client, rg_metrics_service)
689685 . await
690686 . with_context ( |_| ApplyRoleGroupServiceSnafu {
691- rolegroup : rolegroup_ref . clone ( ) ,
687+ role_group : rolegroup_name . clone ( ) ,
692688 } ) ?;
693689 cluster_resources
694690 . add ( client, rg_configmap)
695691 . await
696692 . with_context ( |_| ApplyRoleGroupConfigSnafu {
697- rolegroup : rolegroup_ref . clone ( ) ,
693+ role_group : rolegroup_name . clone ( ) ,
698694 } ) ?;
699695
700696 // Note: The StatefulSet needs to be applied after all ConfigMaps and Secrets it mounts
@@ -705,7 +701,7 @@ pub async fn reconcile_kafka(
705701 . add ( client, rg_statefulset)
706702 . await
707703 . with_context ( |_| ApplyRoleGroupStatefulSetSnafu {
708- rolegroup : rolegroup_ref . clone ( ) ,
704+ role_group : rolegroup_name . clone ( ) ,
709705 } ) ?,
710706 ) ;
711707 }
0 commit comments