Skip to content

Commit 4043d4c

Browse files
authored
Merge pull request kubernetes#92323 from wfernandes/rename-NodeImageWhiteList
Rename NodeImageWhiteList to NodePrePullImageList
2 parents b5dd760 + 296f503 commit 4043d4c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

test/e2e/common/runtime.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ while true; do sleep 1; done
265265

266266
ginkgo.Context("when running a container with a new image", func() {
267267

268-
// Images used for ConformanceContainer are not added into NodeImageWhiteList, because this test is
268+
// Images used for ConformanceContainer are not added into NodePrePullImageList, because this test is
269269
// testing image pulling, these images don't need to be prepulled. The ImagePullPolicy
270-
// is v1.PullAlways, so it won't be blocked by framework image white list check.
270+
// is v1.PullAlways, so it won't be blocked by framework image pre-pull list check.
271271
imagePullTest := func(image string, hasSecret bool, expectedPhase v1.PodPhase, expectedPullStatus bool, windowsImage bool) {
272272
command := []string{"/bin/sh", "-c", "while true; do sleep 1; done"}
273273
if windowsImage {

test/e2e/framework/pods.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ func (c *PodClient) mungeSpec(pod *v1.Pod) {
185185
// in the test anyway.
186186
continue
187187
}
188-
// If the image policy is not PullAlways, the image must be in the white list and
188+
// If the image policy is not PullAlways, the image must be in the pre-pull list and
189189
// pre-pulled.
190-
gomega.Expect(ImageWhiteList.Has(c.Image)).To(gomega.BeTrue(), "Image %q is not in the white list, consider adding it to CommonImageWhiteList in test/e2e/common/util.go or NodeImageWhiteList in test/e2e_node/image_list.go", c.Image)
191-
// Do not pull images during the tests because the images in white list should have
190+
gomega.Expect(ImageWhiteList.Has(c.Image)).To(gomega.BeTrue(), "Image %q is not in the white list, consider adding it to CommonImageWhiteList in test/e2e/common/util.go or NodePrePullImageList in test/e2e_node/image_list.go", c.Image)
191+
// Do not pull images during the tests because the images in pre-pull list should have
192192
// been prepulled.
193193
c.ImagePullPolicy = v1.PullNever
194194
}

test/e2e_node/image_list.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ const (
4343
imagePullRetryDelay = time.Second
4444
)
4545

46-
// NodeImageWhiteList is a list of images used in node e2e test. These images will be prepulled
46+
// NodePrePullImageList is a list of images used in node e2e test. These images will be prepulled
4747
// before test running so that the image pulling won't fail in actual test.
48-
var NodeImageWhiteList = sets.NewString(
48+
var NodePrePullImageList = sets.NewString(
4949
imageutils.GetE2EImage(imageutils.Agnhost),
5050
"google/cadvisor:latest",
5151
"k8s.gcr.io/stress:v1",
@@ -66,8 +66,8 @@ var NodeImageWhiteList = sets.NewString(
6666
// 2. the ones passed in from framework.TestContext.ExtraEnvs
6767
// So this function needs to be called after the extra envs are applied.
6868
func updateImageWhiteList() {
69-
// Union NodeImageWhiteList and CommonImageWhiteList into the framework image white list.
70-
framework.ImageWhiteList = NodeImageWhiteList.Union(commontest.CommonImageWhiteList)
69+
// Union NodePrePullImageList and CommonImageWhiteList into the framework image pre-pull list.
70+
framework.ImageWhiteList = NodePrePullImageList.Union(commontest.CommonImageWhiteList)
7171
// Images from extra envs
7272
framework.ImageWhiteList.Insert(getNodeProblemDetectorImage())
7373
framework.ImageWhiteList.Insert(getSRIOVDevicePluginImage())

test/e2e_node/runtime_conformance_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ var _ = framework.KubeDescribe("Container Runtime Conformance Test", func() {
4848
}
4949
}
5050
}`
51-
// The following images are not added into NodeImageWhiteList, because this test is
51+
// The following images are not added into NodePrePullImageList, because this test is
5252
// testing image pulling, these images don't need to be prepulled. The ImagePullPolicy
53-
// is v1.PullAlways, so it won't be blocked by framework image white list check.
53+
// is v1.PullAlways, so it won't be blocked by framework image pre-pull list check.
5454
for _, testCase := range []struct {
5555
description string
5656
image string

0 commit comments

Comments
 (0)