mirror of
https://github.com/rancher/types.git
synced 2025-09-01 05:09:10 +00:00
Reverse weavework image mirror
This commit is contained in:
@@ -6,6 +6,9 @@ var Mirrors = map[string]string{}
|
||||
|
||||
func Mirror(image string) string {
|
||||
orig := image
|
||||
if strings.HasPrefix(image, "weaveworks") {
|
||||
return image
|
||||
}
|
||||
|
||||
image = strings.Replace(image, "gcr.io/google_containers", "rancher", 1)
|
||||
image = strings.Replace(image, "quay.io/coreos/", "rancher/coreos-", 1)
|
||||
@@ -21,7 +24,6 @@ func Mirror(image string) string {
|
||||
image = strings.Replace(image, "quay.io/pires", "rancher", 1)
|
||||
image = strings.Replace(image, "coredns/", "rancher/coredns-", 1)
|
||||
image = strings.Replace(image, "minio/", "rancher/minio-", 1)
|
||||
image = strings.Replace(image, "weaveworks/", "rancher/weaveworks-", 1)
|
||||
|
||||
Mirrors[image] = orig
|
||||
return image
|
||||
|
Reference in New Issue
Block a user