Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Update regex to match k8s docs
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Sloka <[email protected]>
  • Loading branch information
stevesloka committed Apr 20, 2018
1 parent 6bec96d commit 877ecb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion discovery/pkg/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/kubernetes-discoverer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/openstack-discoverer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 877ecb8

Please sign in to comment.