tests: Fixes Windows image pulling tests

A previous commit removed all hardcoded image names from the tests
and centralized them into kubernetes/test/utils/image/manifest.go,
but it contained a few errors, which causes the image pulling tests
to fail on Windows:

1. No entry was written for AuthenticatedWindowsNanoServer, causing
   one of the tests to try to spawn a pod with the image name /.
2. The registry set for WindowsNanoServer was e2eRegistry, which is
   set to a dockerhub registry (e2eteam) in all sig-windows jobs,
   which is not the purpose of the test itself (the test tries to
   spawn a pod using an image from gcr.io).

The reason why e2eRegistry is set to e2eteam is because that
registry contains the Windows images needed for all the Kubernetes
E2E tests.

This commit addresses this issue.
This commit is contained in:
Claudiu Belu 2019-06-17 01:38:57 -07:00
parent 9162d932cf
commit d274107620

View File

@ -90,6 +90,7 @@ var (
registry = initReg()
dockerLibraryRegistry = registry.DockerLibraryRegistry
e2eRegistry = registry.E2eRegistry
e2eGcRegistry = "gcr.io/kubernetes-e2e-test-images"
gcAuthenticatedRegistry = registry.GcAuthenticatedRegistry
gcRegistry = registry.GcRegistry
googleContainerRegistry = registry.GoogleContainerRegistry
@ -221,6 +222,7 @@ func initImageConfigs() map[int]Config {
configs[Agnhost] = Config{e2eRegistry, "agnhost", "2.0"}
configs[Alpine] = Config{dockerLibraryRegistry, "alpine", "3.7"}
configs[AuthenticatedAlpine] = Config{gcAuthenticatedRegistry, "alpine", "3.7"}
configs[AuthenticatedWindowsNanoServer] = Config{gcAuthenticatedRegistry, "windows-nanoserver", "v1"}
configs[APIServer] = Config{e2eRegistry, "sample-apiserver", "1.10"}
configs[AppArmorLoader] = Config{e2eRegistry, "apparmor-loader", "1.0"}
configs[AuditProxy] = Config{e2eRegistry, "audit-proxy", "1.0"}
@ -269,7 +271,7 @@ func initImageConfigs() map[int]Config {
configs[VolumeISCSIServer] = Config{e2eRegistry, "volume/iscsi", "2.0"}
configs[VolumeGlusterServer] = Config{e2eRegistry, "volume/gluster", "1.0"}
configs[VolumeRBDServer] = Config{e2eRegistry, "volume/rbd", "1.0.1"}
configs[WindowsNanoServer] = Config{e2eRegistry, "windows-nanoserver", "v1"}
configs[WindowsNanoServer] = Config{e2eGcRegistry, "windows-nanoserver", "v1"}
return configs
}