@@ -22,8 +22,10 @@ use stackable_operator::{
2222 PvcConfig , PvcConfigFragment , Resources , ResourcesFragment ,
2323 } ,
2424 } ,
25- config:: fragment:: { self , Fragment , ValidationError } ,
26- config:: merge:: Merge ,
25+ config:: {
26+ fragment:: { self , Fragment , ValidationError } ,
27+ merge:: Merge ,
28+ } ,
2729 k8s_openapi:: {
2830 api:: core:: v1:: PersistentVolumeClaim , apimachinery:: pkg:: api:: resource:: Quantity ,
2931 } ,
@@ -34,6 +36,7 @@ use stackable_operator::{
3436 schemars:: { self , JsonSchema } ,
3537 status:: condition:: { ClusterCondition , HasStatusCondition } ,
3638 time:: Duration ,
39+ utils:: cluster_domain:: KUBERNETES_CLUSTER_DOMAIN ,
3740} ;
3841use std:: { collections:: BTreeMap , str:: FromStr } ;
3942use strum:: { Display , EnumIter , EnumString , IntoEnumIterator } ;
@@ -283,9 +286,12 @@ pub struct KafkaPodRef {
283286
284287impl KafkaPodRef {
285288 pub fn fqdn ( & self ) -> String {
289+ let cluster_domain = KUBERNETES_CLUSTER_DOMAIN
290+ . get ( )
291+ . expect ( "KUBERNETES_CLUSTER_DOMAIN must first be set by calling initialize_operator" ) ;
286292 format ! (
287- "{}.{}.{}.svc.cluster.local " ,
288- self . pod_name, self . role_group_service_name, self . namespace
293+ "{}.{}.{}.svc.{} " ,
294+ self . pod_name, self . role_group_service_name, self . namespace, cluster_domain
289295 )
290296 }
291297}
0 commit comments