diff --git a/discovery/pkg/util/util.go b/discovery/pkg/util/util.go index 360a636e..705b7d48 100644 --- a/discovery/pkg/util/util.go +++ b/discovery/pkg/util/util.go @@ -29,7 +29,7 @@ func GetFormatter() *logrus.TextFormatter { // IsInvalidClusterName returns true if valid cluster name func IsInvalidClusterName(clustername string) bool { - matched, err := regexp.MatchString("^[a-zA-Z0-9]+[a-zA-Z0-9-]*[a-zA-Z0-9]+$", clustername) + matched, err := regexp.MatchString("^[a-z]([-a-z0-9]*[a-z0-9])?$", clustername) if err != nil { log.Fatal(err) } diff --git a/docs/kubernetes-discoverer.md b/docs/kubernetes-discoverer.md index 906455c4..c75c3b57 100644 --- a/docs/kubernetes-discoverer.md +++ b/docs/kubernetes-discoverer.md @@ -22,7 +22,7 @@ Arguments are available to customize the discoverer, most have defaults but othe | num-threads | 2 | Specify number of threads to use when processing queue items | gimbal-kubecfg-file | "" | Location of kubecfg file for access to Kubernetes cluster hosting Gimbal | discover-kubecfg-file | "" | Location of kubecfg file for access to remote Kubernetes cluster to watch for services / endpoints -| cluster-name | "" | Name of cluster scraping for services & endpoints (Cannot start or end with a hyphen and must be alpha-numeric) +| cluster-name | "" | Name of cluster scraping for services & endpoints (Cannot start or end with a hyphen and must be lowercase alpha-numeric) | debug | false | Enable debug logging ### Credentials diff --git a/docs/openstack-discoverer.md b/docs/openstack-discoverer.md index f7812d2c..1083a04c 100644 --- a/docs/openstack-discoverer.md +++ b/docs/openstack-discoverer.md @@ -21,7 +21,7 @@ Arguments are available to customize the discoverer, most have defaults but othe | version | false | Show version, build information and quit | num-threads | 2 | Specify number of threads to use when processing queue items | gimbal-kubecfg-file | "" | Location of kubecfg file for access to Kubernetes cluster hosting Gimbal -| cluster-name | "" | Name of cluster scraping for services & endpoints (Cannot start or end with a hyphen and must be alpha-numeric) +| cluster-name | "" | Name of cluster scraping for services & endpoints (Cannot start or end with a hyphen and must be lowercase alpha-numeric) | debug | false | Enable debug logging | reconciliation-period | 30s | The interval of time between reconciliation loop runs | http-client-timeout | 5s | The HTTP client request timeout