Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Replaces images used with agnhost (part 2) #78396

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions test/e2e/apimachinery/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var _ = SIGDescribe("AdmissionWebhook", func() {
// Note that in 1.9 we will have backwards incompatible change to
// admission webhooks, so the image will be updated to 1.9 sometime in
// the development 1.9 cycle.
deployWebhookAndService(f, imageutils.GetE2EImage(imageutils.AdmissionWebhook), context)
deployWebhookAndService(f, imageutils.GetE2EImage(imageutils.Agnhost), context)
})

ginkgo.AfterEach(func() {
Expand Down Expand Up @@ -342,11 +342,11 @@ func deployWebhookAndService(f *framework.Framework, image string, context *cert
Name: "sample-webhook",
VolumeMounts: mounts,
Args: []string{
"webhook",
"--tls-cert-file=/webhook.local.config/certificates/tls.crt",
"--tls-private-key-file=/webhook.local.config/certificates/tls.key",
"--alsologtostderr",
"-v=4",
"2>&1",
},
Image: image,
},
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/common/kubelet_etc_hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const (
etcHostsOriginalPath = "/etc/hosts-original"
)

var etcHostsImageName = imageutils.GetE2EImage(imageutils.Netexec)
var etcHostsImageName = imageutils.GetE2EImage(imageutils.Agnhost)

type KubeletManagedHostConfig struct {
hostNetworkPod *v1.Pod
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/common/lifecycle_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ var _ = framework.KubeDescribe("Container Lifecycle Hook", func() {
Containers: []v1.Container{
{
Name: "pod-handle-http-request",
Image: imageutils.GetE2EImage(imageutils.Netexec),
Image: imageutils.GetE2EImage(imageutils.Agnhost),
Args: []string{"netexec"},
Ports: []v1.ContainerPort{
{
ContainerPort: 8080,
Expand Down
2 changes: 0 additions & 2 deletions test/e2e/common/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ var CommonImageWhiteList = sets.NewString(
imageutils.GetE2EImage(imageutils.IpcUtils),
imageutils.GetE2EImage(imageutils.Mounttest),
imageutils.GetE2EImage(imageutils.MounttestUser),
imageutils.GetE2EImage(imageutils.Netexec),
imageutils.GetE2EImage(imageutils.Nginx),
imageutils.GetE2EImage(imageutils.ServeHostname),
imageutils.GetE2EImage(imageutils.TestWebserver),
imageutils.GetE2EImage(imageutils.VolumeNFSServer),
imageutils.GetE2EImage(imageutils.VolumeGlusterServer),
imageutils.GetE2EImage(imageutils.Net),
)

type testImagesStruct struct {
Expand Down
10 changes: 5 additions & 5 deletions test/e2e/framework/networking_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const (
RegexIPv6 = "(?:(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){6})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:::(?:(?:(?:[0-9a-fA-F]{1,4})):){5})(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})))?::(?:(?:(?:[0-9a-fA-F]{1,4})):){4})(?:(?:(?:(?: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:(?:(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9]))\\.){3}(?:(?:25[0-5]|(?:[1-9]|1[0-9]|2[0-4])?[0-9])))))))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,5}(?:(?:[0-9a-fA-F]{1,4})))?::)(?:(?:[0-9a-fA-F]{1,4})))|(?:(?:(?:(?:(?:(?:[0-9a-fA-F]{1,4})):){0,6}(?:(?:[0-9a-fA-F]{1,4})))?::))))"
)

var netexecImageName = imageutils.GetE2EImage(imageutils.Netexec)
var netexecImageName = imageutils.GetE2EImage(imageutils.Agnhost)

// NewNetworkingTestConfig creates and sets up a new test config helper.
func NewNetworkingTestConfig(f *Framework) *NetworkingTestConfig {
Expand Down Expand Up @@ -426,8 +426,8 @@ func (config *NetworkingTestConfig) createNetShellPodSpec(podName, hostname stri
Name: "webserver",
Image: netexecImageName,
ImagePullPolicy: v1.PullIfNotPresent,
Command: []string{
"/netexec",
Args: []string{
"netexec",
fmt.Sprintf("--http-port=%d", EndpointHTTPPort),
fmt.Sprintf("--udp-port=%d", EndpointUDPPort),
},
Expand Down Expand Up @@ -470,8 +470,8 @@ func (config *NetworkingTestConfig) createTestPodSpec() *v1.Pod {
Name: "webserver",
Image: netexecImageName,
ImagePullPolicy: v1.PullIfNotPresent,
Command: []string{
"/netexec",
Args: []string{
"netexec",
fmt.Sprintf("--http-port=%d", EndpointHTTPPort),
fmt.Sprintf("--udp-port=%d", EndpointUDPPort),
},
Expand Down
8 changes: 4 additions & 4 deletions test/e2e/framework/service_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,8 @@ func (j *ServiceTestJig) newRCTemplate(namespace string) *v1.ReplicationControll
Containers: []v1.Container{
{
Name: "netexec",
Image: imageutils.GetE2EImage(imageutils.Netexec),
Args: []string{"--http-port=80", "--udp-port=80"},
Image: imageutils.GetE2EImage(imageutils.Agnhost),
Args: []string{"netexec", "--http-port=80", "--udp-port=80"},
ReadinessProbe: &v1.Probe{
PeriodSeconds: 3,
Handler: v1.Handler{
Expand Down Expand Up @@ -836,8 +836,8 @@ func newNetexecPodSpec(podName string, httpPort, udpPort int32, hostNetwork bool
{
Name: "netexec",
Image: netexecImageName,
Command: []string{
"/netexec",
Args: []string{
"netexec",
fmt.Sprintf("--http-port=%d", httpPort),
fmt.Sprintf("--udp-port=%d", udpPort),
},
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/framework/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ func ProxyMode(f *Framework) (string, error) {
Containers: []v1.Container{
{
Name: "detector",
Image: imageutils.GetE2EImage(imageutils.Net),
Image: imageutils.GetE2EImage(imageutils.Agnhost),
Command: []string{"/bin/sleep", "3600"},
},
},
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/framework/volume/fixtures.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,11 @@ func GeneratePodSecurityContext(fsGroup *int64, seLinuxOptions *v1.SELinuxOption
}

// GetTestImage returns the image name with the given input
// If the Node OS is windows, currently we return Nettest image for Windows node
// If the Node OS is windows, currently we return Agnhost image for Windows node
// due to the issue of #https://github.com/kubernetes-sigs/windows-testing/pull/35.
func GetTestImage(image string) string {
if framework.NodeOSDistroIs("windows") {
return imageutils.GetE2EImage(imageutils.Nettest)
return imageutils.GetE2EImage(imageutils.Agnhost)
}
return image
}
3 changes: 2 additions & 1 deletion test/e2e/kubectl/portforward.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ func pfPod(expectedClientData, chunks, chunkSize, chunkIntervalMillis string, bi
Containers: []v1.Container{
{
Name: "readiness",
Image: imageutils.GetE2EImage(imageutils.Netexec),
Image: imageutils.GetE2EImage(imageutils.Agnhost),
Args: []string{"netexec"},
ReadinessProbe: &v1.Probe{
Handler: v1.Handler{
Exec: &v1.ExecAction{
Expand Down
14 changes: 7 additions & 7 deletions test/e2e/network/kube_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"github.com/onsi/gomega"
)

var kubeProxyE2eImage = imageutils.GetE2EImage(imageutils.Net)
var kubeProxyE2eImage = imageutils.GetE2EImage(imageutils.Agnhost)

var _ = SIGDescribe("Network", func() {
const (
Expand Down Expand Up @@ -102,8 +102,8 @@ var _ = SIGDescribe("Network", func() {
Name: "e2e-net-client",
Image: kubeProxyE2eImage,
ImagePullPolicy: "Always",
Command: []string{
"/net", "-serve", fmt.Sprintf("0.0.0.0:%d", testDaemonHTTPPort),
Args: []string{
"net", "--serve", fmt.Sprintf("0.0.0.0:%d", testDaemonHTTPPort),
},
},
},
Expand All @@ -124,10 +124,10 @@ var _ = SIGDescribe("Network", func() {
Name: "e2e-net-server",
Image: kubeProxyE2eImage,
ImagePullPolicy: "Always",
Command: []string{
"/net",
"-runner", "nat-closewait-server",
"-options",
Args: []string{
"net",
"--runner", "nat-closewait-server",
"--options",
fmt.Sprintf(`{"LocalAddr":"0.0.0.0:%v", "PostFindTimeoutSeconds":%v}`,
testDaemonTCPPort,
postFinTimeoutSeconds),
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/network/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ var _ = SIGDescribe("Services", func() {
}()

t.Name = "slow-terminating-unready-pod"
t.Image = imageutils.GetE2EImage(imageutils.Netexec)
t.Image = imageutils.GetE2EImage(imageutils.Agnhost)
port := 80
terminateSeconds := int64(600)

Expand All @@ -1292,7 +1292,7 @@ var _ = SIGDescribe("Services", func() {
},
}
rcSpec := framework.RcByNameContainer(t.Name, 1, t.Image, t.Labels, v1.Container{
Args: []string{fmt.Sprintf("--http-port=%d", port)},
Args: []string{"netexec", fmt.Sprintf("--http-port=%d", port)},
Name: t.Name,
Image: t.Image,
Ports: []v1.ContainerPort{{ContainerPort: int32(port), Protocol: v1.ProtocolTCP}},
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/node/pre_stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func testPreStop(c clientset.Interface, ns string) {
Containers: []v1.Container{
{
Name: "server",
Image: imageutils.GetE2EImage(imageutils.Nettest),
Image: imageutils.GetE2EImage(imageutils.Agnhost),
Args: []string{"nettest"},
Ports: []v1.ContainerPort{{ContainerPort: 8080}},
},
},
Expand Down
1 change: 0 additions & 1 deletion test/e2e_node/image_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ var NodeImageWhiteList = sets.NewString(
imageutils.GetE2EImage(imageutils.Nginx),
imageutils.GetE2EImage(imageutils.Perl),
imageutils.GetE2EImage(imageutils.ServeHostname),
imageutils.GetE2EImage(imageutils.Netexec),
imageutils.GetE2EImage(imageutils.Nonewprivs),
imageutils.GetPauseImageName(),
gpu.GetGPUDevicePluginImage(),
Expand Down
14 changes: 1 addition & 13 deletions test/utils/image/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ var (
const (
// CRDConversionWebhook image
CRDConversionWebhook = iota
// AdmissionWebhook image
AdmissionWebhook
// Agnhost image
Agnhost
// Alpine image
Expand Down Expand Up @@ -163,12 +161,6 @@ const (
MounttestUser
// Nautilus image
Nautilus
// Net image
Net
// Netexec image
Netexec
// Nettest image
Nettest
// Nginx image
Nginx
// NginxNew image
Expand Down Expand Up @@ -217,8 +209,7 @@ const (
func initImageConfigs() map[int]Config {
configs := map[int]Config{}
configs[CRDConversionWebhook] = Config{e2eRegistry, "crd-conversion-webhook", "1.13rev2"}
configs[AdmissionWebhook] = Config{e2eRegistry, "webhook", "1.15v1"}
configs[Agnhost] = Config{e2eRegistry, "agnhost", "2.0"}
configs[Agnhost] = Config{e2eRegistry, "agnhost", "2.1"}
configs[Alpine] = Config{dockerLibraryRegistry, "alpine", "3.7"}
configs[AuthenticatedAlpine] = Config{gcAuthenticatedRegistry, "alpine", "3.7"}
configs[APIServer] = Config{e2eRegistry, "sample-apiserver", "1.10"}
Expand All @@ -245,9 +236,6 @@ func initImageConfigs() map[int]Config {
configs[Mounttest] = Config{e2eRegistry, "mounttest", "1.0"}
configs[MounttestUser] = Config{e2eRegistry, "mounttest-user", "1.0"}
configs[Nautilus] = Config{e2eRegistry, "nautilus", "1.0"}
configs[Net] = Config{e2eRegistry, "net", "1.0"}
configs[Netexec] = Config{e2eRegistry, "netexec", "1.1"}
configs[Nettest] = Config{e2eRegistry, "nettest", "1.0"}
configs[Nginx] = Config{dockerLibraryRegistry, "nginx", "1.14-alpine"}
configs[NginxNew] = Config{dockerLibraryRegistry, "nginx", "1.15-alpine"}
configs[Nonewprivs] = Config{e2eRegistry, "nonewprivs", "1.0"}
Expand Down