+
+ def _generate_repo_list_file(self):
+ """Generate the repositories list for the test."""
+ # The list is taken from
+ # https://github.com/kubernetes/kubernetes/blob/master/test/utils/image/manifest.go
+ # It may needs update regularly
+ gcr_repo = os.getenv("GCR_REPO", self.gcr_repo)
+ k8s_gcr_repo = os.getenv("K8S_GCR_REPO", self.k8s_gcr_repo)
+ repo_list = {
+ "GcAuthenticatedRegistry": "{}/authenticated-image-pulling".format(
+ gcr_repo),
+ "E2eRegistry": "{}/kubernetes-e2e-test-images".format(
+ gcr_repo),
+ "PromoterE2eRegistry": "{}/e2e-test-images".format(
+ k8s_gcr_repo),
+ "BuildImageRegistry": "{}/build-image".format(k8s_gcr_repo),
+ "InvalidRegistry": "invalid.com/invalid",
+ "GcEtcdRegistry": "{}".format(k8s_gcr_repo),
+ "GcRegistry": "{}".format(k8s_gcr_repo),
+ "SigStorageRegistry": "{}/sig-storage".format(k8s_gcr_repo),
+ "PrivateRegistry": "{}/k8s-authenticated-test".format(
+ gcr_repo),
+ "SampleRegistry": "{}/google-samples".format(gcr_repo),
+ "GcrReleaseRegistry": "{}/gke-release".format(gcr_repo),
+ "MicrosoftRegistry": "mcr.microsoft.com",
+ }
+ with open("{}/repositories.yml".format(self.res_dir), 'w') as file:
+ yaml.dump(repo_list, file)