Allow dots in resource names
Kubernetes resource names are DNS_SUBDOMAINs, which are basically
DNS_LABELs joined together with dots. It's perfectly reasonable to
have a name `foo.bar.baz`, for example.
@@ -14,8 +14,8 @@ var (
ErrInvalidServiceID = errors.New("invalid service ID")
LegacyServiceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$")
- ResourceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$")
- UnqualifiedResourceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$")
+ ResourceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+):([a-zA-Z0-9_-]+)/([a-zA-Z0-9_.-]+)$")
+ UnqualifiedResourceIDRegexp = regexp.MustCompile("^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_.-]+)$")
)
// ResourceID is an opaque type which uniquely identifies a resource in an
