diff --git a/pkg/webhook/pod/containerregistry_registry.go b/pkg/webhook/pod/containerregistry_registry.go index fcbacd65..1ab58f75 100644 --- a/pkg/webhook/pod/containerregistry_registry.go +++ b/pkg/webhook/pod/containerregistry_registry.go @@ -54,7 +54,7 @@ func (r registry) Tag() string { func NewRegistry(value string) Registry { reg := make(registry) - r := regexp.MustCompile(`(((?P[a-zA-Z0-9-.]+)\/)?((?P[a-zA-Z0-9-.]+)\/))?(?P[a-zA-Z0-9-.]+)(:(?P[a-zA-Z0-9-.]+))?`) + r := regexp.MustCompile(`(((?P[a-zA-Z0-9-._]+)\/)?((?P[a-zA-Z0-9-._]+)\/))?(?P[a-zA-Z0-9-._]+)(:(?P[a-zA-Z0-9-._]+))?`) match := r.FindStringSubmatch(value) for i, name := range r.SubexpNames() { if i > 0 && i <= len(match) {