Update dependencies to K8s 1.8

This commit is contained in:
Nick Sardo 2017-09-29 10:12:14 -07:00
parent ba6c89672d
commit 6a59f4c9a2
1114 changed files with 160955 additions and 262845 deletions

View file

@ -1,7 +1,5 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
@ -11,7 +9,6 @@ load(
go_library(
name = "go_default_library",
srcs = ["parsers.go"],
tags = ["automanaged"],
deps = ["//vendor/github.com/docker/distribution/reference:go_default_library"],
)
@ -19,7 +16,6 @@ go_test(
name = "go_default_test",
srcs = ["parsers_test.go"],
library = ":go_default_library",
tags = ["automanaged"],
)
filegroup(

View file

@ -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)
}