mirror of https://github.com/kubernetes/kops.git
Fix containerRegistry for Kubernetes < 1.10
This commit is contained in:
parent
9a4c553fde
commit
921591343a
|
@ -151,7 +151,11 @@ func (a *AssetBuilder) RemapImage(image string) (string, error) {
|
||||||
normalized := image
|
normalized := image
|
||||||
|
|
||||||
// Remove the 'standard' kubernetes image prefix, just for sanity
|
// Remove the 'standard' kubernetes image prefix, just for sanity
|
||||||
normalized = strings.TrimPrefix(normalized, "k8s.gcr.io/")
|
if !util.IsKubernetesGTE("1.10", a.KubernetesVersion) && strings.HasPrefix(normalized, "gcr.io/google_containers/") {
|
||||||
|
normalized = strings.TrimPrefix(normalized, "gcr.io/google_containers/")
|
||||||
|
} else {
|
||||||
|
normalized = strings.TrimPrefix(normalized, "k8s.gcr.io/")
|
||||||
|
}
|
||||||
|
|
||||||
// We can't nest arbitrarily
|
// We can't nest arbitrarily
|
||||||
// Some risk of collisions, but also -- and __ in the names appear to be blocked by docker hub
|
// Some risk of collisions, but also -- and __ in the names appear to be blocked by docker hub
|
||||||
|
|
Loading…
Reference in New Issue