Merge pull request #93521 from msau42/update-registry
Update e2e csi images to k8s.gcr.io
This commit is contained in:
@@ -36,10 +36,10 @@ type RegistryList struct {
|
||||
BuildImageRegistry string `yaml:"buildImageRegistry"`
|
||||
InvalidRegistry string `yaml:"invalidRegistry"`
|
||||
GcRegistry string `yaml:"gcRegistry"`
|
||||
SigStorageRegistry string `yaml:"sigStorageRegistry"`
|
||||
GcrReleaseRegistry string `yaml:"gcrReleaseRegistry"`
|
||||
PrivateRegistry string `yaml:"privateRegistry"`
|
||||
SampleRegistry string `yaml:"sampleRegistry"`
|
||||
K8sCSI string `yaml:"k8sCSI"`
|
||||
}
|
||||
|
||||
// Config holds an images registry, name, and version
|
||||
@@ -75,10 +75,10 @@ func initReg() RegistryList {
|
||||
BuildImageRegistry: "k8s.gcr.io/build-image",
|
||||
InvalidRegistry: "invalid.com/invalid",
|
||||
GcRegistry: "k8s.gcr.io",
|
||||
SigStorageRegistry: "k8s.gcr.io/sig-storage",
|
||||
GcrReleaseRegistry: "gcr.io/gke-release",
|
||||
PrivateRegistry: "gcr.io/k8s-authenticated-test",
|
||||
SampleRegistry: "gcr.io/google-samples",
|
||||
K8sCSI: "gcr.io/k8s-staging-csi",
|
||||
}
|
||||
repoList := os.Getenv("KUBE_TEST_REPO_LIST")
|
||||
if repoList == "" {
|
||||
@@ -107,9 +107,9 @@ var (
|
||||
buildImageRegistry = registry.BuildImageRegistry
|
||||
gcAuthenticatedRegistry = registry.GcAuthenticatedRegistry
|
||||
gcRegistry = registry.GcRegistry
|
||||
sigStorageRegistry = registry.SigStorageRegistry
|
||||
gcrReleaseRegistry = registry.GcrReleaseRegistry
|
||||
invalidRegistry = registry.InvalidRegistry
|
||||
k8sCSI = registry.K8sCSI
|
||||
// PrivateRegistry is an image repository that requires authentication
|
||||
PrivateRegistry = registry.PrivateRegistry
|
||||
sampleRegistry = registry.SampleRegistry
|
||||
@@ -221,7 +221,7 @@ func initImageConfigs() map[int]Config {
|
||||
configs[JessieDnsutils] = Config{e2eRegistry, "jessie-dnsutils", "1.0"}
|
||||
configs[Kitten] = Config{e2eRegistry, "kitten", "1.0"}
|
||||
configs[Nautilus] = Config{e2eRegistry, "nautilus", "1.0"}
|
||||
configs[NFSProvisioner] = Config{k8sCSI, "nfs-provisioner", "v2.2.2"}
|
||||
configs[NFSProvisioner] = Config{sigStorageRegistry, "nfs-provisioner", "v2.2.2"}
|
||||
configs[Nginx] = Config{dockerLibraryRegistry, "nginx", "1.14-alpine"}
|
||||
configs[NginxNew] = Config{dockerLibraryRegistry, "nginx", "1.15-alpine"}
|
||||
configs[Nonewprivs] = Config{e2eRegistry, "nonewprivs", "1.0"}
|
||||
@@ -280,6 +280,8 @@ func ReplaceRegistryInImageURL(imageURL string) (string, error) {
|
||||
registryAndUser = e2eVolumeRegistry
|
||||
case "k8s.gcr.io":
|
||||
registryAndUser = gcRegistry
|
||||
case "k8s.gcr.io/sig-storage":
|
||||
registryAndUser = sigStorageRegistry
|
||||
case "gcr.io/k8s-authenticated-test":
|
||||
registryAndUser = PrivateRegistry
|
||||
case "gcr.io/google-samples":
|
||||
@@ -288,8 +290,6 @@ func ReplaceRegistryInImageURL(imageURL string) (string, error) {
|
||||
registryAndUser = gcrReleaseRegistry
|
||||
case "docker.io/library":
|
||||
registryAndUser = dockerLibraryRegistry
|
||||
case "gcr.io/k8s-staging-csi":
|
||||
registryAndUser = k8sCSI
|
||||
default:
|
||||
if countParts == 1 {
|
||||
// We assume we found an image from docker hub library
|
||||
|
@@ -94,9 +94,9 @@ var registryTests = []struct {
|
||||
},
|
||||
},
|
||||
{
|
||||
"gcr.io/k8s-staging-csi/test:latest",
|
||||
"k8s.gcr.io/sig-storage/test:latest",
|
||||
result{
|
||||
result: "test.io/k8s-staging-csi/test:latest",
|
||||
result: "test.io/sig-storage/test:latest",
|
||||
err: nil,
|
||||
},
|
||||
},
|
||||
@@ -119,7 +119,7 @@ func TestReplaceRegistryInImageURL(t *testing.T) {
|
||||
gcrReleaseRegistry = "test.io/gke-release"
|
||||
PrivateRegistry = "test.io/k8s-authenticated-test"
|
||||
sampleRegistry = "test.io/google-samples"
|
||||
k8sCSI = "test.io/k8s-staging-csi"
|
||||
sigStorageRegistry = "test.io/sig-storage"
|
||||
|
||||
for _, tt := range registryTests {
|
||||
t.Run(tt.in, func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user