From 5e9b9ef0d3f355a9fb56f391a52f741c5f411167 Mon Sep 17 00:00:00 2001 From: Juana De La Cuesta Date: Fri, 31 Mar 2023 16:38:16 +0200 Subject: [PATCH] style: update documentation (#16729) --- nomad/structs/services.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nomad/structs/services.go b/nomad/structs/services.go index 972c2c199..3bbbdb112 100644 --- a/nomad/structs/services.go +++ b/nomad/structs/services.go @@ -799,6 +799,9 @@ func (s *Service) ValidateName(name string) error { // (https://tools.ietf.org/html/rfc952), RFC-1123 ยง2.1 // (https://tools.ietf.org/html/rfc1123), and RFC-2782 // (https://tools.ietf.org/html/rfc2782). + // This validation is enforced on Nomad, but not on Consul, however if + // consul-template is being used, service names with dots in them wont be + // admissible. re := regexp.MustCompile(`^(?i:[a-z0-9]|[a-z0-9][a-z0-9\-]{0,61}[a-z0-9])$`) if !re.MatchString(name) { return fmt.Errorf("Service name must be valid per RFC 1123 and can contain only alphanumeric characters or dashes and must be no longer than 63 characters")