You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/stackable-operator/src/commons/networking.rs
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,11 @@ impl FromStr for DomainName {
17
17
typeErr = validation::Errors;
18
18
19
19
fnfrom_str(value:&str) -> Result<Self,Self::Err>{
20
+
// Remove optional trailing dot before validation, logic taken from https://github.com/kubernetes/kubernetes/blob/30de989fb57fb5921a7ae3e3203cf7ecac9cf3f0/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L100
21
+
let value = value.strip_suffix('.').unwrap_or(value);
20
22
validation::is_rfc_1123_subdomain(value)?;
21
-
Ok(DomainName(value.to_owned()))
23
+
// Append trailing dot to make the domain name a FQDN to improve DNS lookup performance, see https://github.com/stackabletech/issues/issues/656
0 commit comments