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 ca081e2 commit 220cda7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rust/operator-binary/src/kerberos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,10 @@ fn principal_host_part(hbase: &HbaseCluster) -> Result<String, Error> {
let hbase_namespace = hbase.namespace().context(ObjectMissingNamespaceSnafu {
hbase: ObjectRef::from_obj(hbase),
})?;
let cluster_domain = KUBERNETES_CLUSTER_DOMAIN
.get()
.expect("KUBERNETES_CLUSTER_DOMAIN must first be set by calling initialize_operator");
Ok(format!(
"{hbase_name}.{hbase_namespace}.svc.{cluster_domain}@${{env.KERBEROS_REALM}}",
cluster_domain = KUBERNETES_CLUSTER_DOMAIN
.get()
.expect("KUBERNETES_CLUSTER_DOMAIN must first be set by calling initialize_operator"),
"{hbase_name}.{hbase_namespace}.svc.{cluster_domain}@${{env.KERBEROS_REALM}}"
))
}

0 comments on commit 220cda7

Please sign in to comment.