@@ -418,40 +418,40 @@ pub async fn reconcile_druid(
418418 ) ;
419419 }
420420
421- if let Some ( listener_class) = druid_role. listener_class_name ( druid) {
422- if let Some ( listener_group_name) = group_listener_name ( druid, druid_role) {
423- let role_group_listener = build_group_listener (
421+ if let Some ( listener_class) = druid_role. listener_class_name ( druid)
422+ && let Some ( listener_group_name) = group_listener_name ( druid, druid_role)
423+ {
424+ let role_group_listener = build_group_listener (
425+ druid,
426+ build_recommended_labels (
424427 druid,
425- build_recommended_labels (
426- druid,
427- DRUID_CONTROLLER_NAME ,
428- & validated_cluster. image . app_version_label_value ,
429- & role_name,
430- "none" ,
431- ) ,
432- listener_class. to_string ( ) ,
433- listener_group_name,
434- druid_role,
435- & validated_cluster. cluster_config . druid_tls_security ,
436- )
437- . context ( ListenerConfigurationSnafu ) ?;
438-
439- let listener = cluster_resources
440- . add ( client, role_group_listener)
441- . await
442- . context ( ApplyGroupListenerSnafu ) ?;
428+ DRUID_CONTROLLER_NAME ,
429+ & validated_cluster. image . app_version_label_value ,
430+ & role_name,
431+ "none" ,
432+ ) ,
433+ listener_class. to_string ( ) ,
434+ listener_group_name,
435+ druid_role,
436+ & validated_cluster. cluster_config . druid_tls_security ,
437+ )
438+ . context ( ListenerConfigurationSnafu ) ?;
443439
444- if * druid_role == DruidRole :: Router {
445- // discovery
446- for discovery_cm in build_discovery_configmaps ( & validated_cluster, listener)
440+ let listener = cluster_resources
441+ . add ( client, role_group_listener)
442+ . await
443+ . context ( ApplyGroupListenerSnafu ) ?;
444+
445+ if * druid_role == DruidRole :: Router {
446+ // discovery
447+ for discovery_cm in build_discovery_configmaps ( & validated_cluster, listener)
448+ . await
449+ . context ( BuildDiscoveryConfigSnafu ) ?
450+ {
451+ cluster_resources
452+ . add ( client, discovery_cm)
447453 . await
448- . context ( BuildDiscoveryConfigSnafu ) ?
449- {
450- cluster_resources
451- . add ( client, discovery_cm)
452- . await
453- . context ( ApplyDiscoveryConfigSnafu ) ?;
454- }
454+ . context ( ApplyDiscoveryConfigSnafu ) ?;
455455 }
456456 }
457457 }
0 commit comments