diff options
Diffstat (limited to 'vendor/k8s.io/kubernetes/pkg/util/parsers')
-rw-r--r-- | vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go b/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go index 4e70cc682..be35da7cc 100644 --- a/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go +++ b/vendor/k8s.io/kubernetes/pkg/util/parsers/parsers.go @@ -18,6 +18,10 @@ package parsers import ( "fmt" + // Import the crypto sha256 algorithm for the docker image parser to work + _ "crypto/sha256" + // Import the crypto/sha512 algorithm for the docker image parser to work with 384 and 512 sha hashes + _ "crypto/sha512" dockerref "github.com/docker/distribution/reference" ) @@ -29,7 +33,7 @@ const ( // ParseImageName parses a docker image string into three parts: repo, tag and digest. // If both tag and digest are empty, a default image tag will be returned. func ParseImageName(image string) (string, string, string, error) { - named, err := dockerref.ParseNamed(image) + named, err := dockerref.ParseNormalizedNamed(image) if err != nil { return "", "", "", fmt.Errorf("couldn't parse image name: %v", err) } |