Skip to content

Commit

Permalink
Capture in variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed Oct 21, 2024
1 parent 9ff2b41 commit d769c21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/crd/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,13 +721,13 @@ impl DruidCluster {

/// The fully-qualified domain name of the role-level load-balanced Kubernetes `Service`
pub fn role_service_fqdn(&self, role: &DruidRole) -> Option<String> {
let cluster_domain = KUBERNETES_CLUSTER_DOMAIN
.get()
.expect("KUBERNETES_CLUSTER_DOMAIN must first be set by calling initialize_operator");
Some(format!(
"{}.{}.svc.{}",
"{}.{}.svc.{cluster_domain}",
self.role_service_name(role)?,
self.metadata.namespace.as_ref()?,
KUBERNETES_CLUSTER_DOMAIN.get().expect(
"KUBERNETES_CLUSTER_DOMAIN must first be set by calling initialize_operator"
),
))
}

Expand Down

0 comments on commit d769c21

Please sign in to comment.