Skip to content

Commit cecc48d

Browse files
committed
test/e2e: Switch backend image to agnhost for multi-arch support
Replace nginxdemos/nginx-hello:plain-text with registry.k8s.io/e2e-test-images/agnhost:2.53 to fix pod startup failures on RHEL 9 which enforces fully qualified image names. The agnhost image is the standard e2e test image used across OpenShift repositories (origin, network-metrics-daemon) and provides multi-arch support and is mirrored in CI infrastructure.
1 parent 9f9cc3b commit cecc48d

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

test/e2e/proxy_test.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func TestOAuthProxyE2E(t *testing.T) {
9292
proxyArgs: []string{
9393
"--upstream=http://localhost:8080",
9494
},
95-
pageResult: "URI: /",
95+
pageResult: "NOW:",
9696
},
9797
{
9898
name: "scope-full",
@@ -108,7 +108,7 @@ func TestOAuthProxyE2E(t *testing.T) {
108108
"--upstream=http://localhost:8080",
109109
`--openshift-sar={"namespace":"` + ns + `","resource":"services","verb":"list"}`,
110110
},
111-
pageResult: "URI: /",
111+
pageResult: "NOW:",
112112
},
113113
{
114114
name: "sar-fail",
@@ -124,7 +124,7 @@ func TestOAuthProxyE2E(t *testing.T) {
124124
"--upstream=http://localhost:8080",
125125
`--openshift-sar={"namespace":"` + ns + `","resource":"routes","resourceName":"proxy-route","verb":"get"}`,
126126
},
127-
pageResult: "URI: /",
127+
pageResult: "NOW:",
128128
},
129129
{
130130
name: "sar-name-fail",
@@ -140,7 +140,7 @@ func TestOAuthProxyE2E(t *testing.T) {
140140
"--upstream=http://localhost:8080",
141141
`--openshift-sar=[{"namespace":"` + ns + `","resource":"services","verb":"list"}, {"namespace":"` + ns + `","resource":"routes","verb":"list"}]`,
142142
},
143-
pageResult: "URI: /",
143+
pageResult: "NOW:",
144144
},
145145
{
146146
name: "sar-multi-fail",
@@ -157,7 +157,7 @@ func TestOAuthProxyE2E(t *testing.T) {
157157
`--skip-auth-regex=^/foo`,
158158
},
159159
accessSubPath: "/foo",
160-
pageResult: "URI: /foo\n",
160+
pageResult: "NOW:",
161161
bypass: true,
162162
},
163163
{
@@ -167,7 +167,7 @@ func TestOAuthProxyE2E(t *testing.T) {
167167
`--skip-auth-regex=^/foo`,
168168
},
169169
accessSubPath: "/bar",
170-
pageResult: "URI: /bar",
170+
pageResult: "NOW:",
171171
},
172172
{
173173
name: "bypass-auth-foo",
@@ -176,7 +176,7 @@ func TestOAuthProxyE2E(t *testing.T) {
176176
`--bypass-auth-for=^/foo`,
177177
},
178178
accessSubPath: "/foo",
179-
pageResult: "URI: /foo\n",
179+
pageResult: "NOW:",
180180
bypass: true,
181181
},
182182
{
@@ -186,7 +186,7 @@ func TestOAuthProxyE2E(t *testing.T) {
186186
`--bypass-auth-except-for=^/foo`,
187187
},
188188
accessSubPath: "/foo",
189-
pageResult: "URI: /foo\n",
189+
pageResult: "NOW:",
190190
},
191191
{
192192
name: "bypass-auth-except-bypassed",
@@ -195,7 +195,7 @@ func TestOAuthProxyE2E(t *testing.T) {
195195
`--bypass-auth-except-for=^/foo`,
196196
},
197197
accessSubPath: "/bar",
198-
pageResult: "URI: /bar",
198+
pageResult: "NOW:",
199199
bypass: true,
200200
},
201201
}
@@ -227,7 +227,7 @@ func TestOAuthProxyE2E(t *testing.T) {
227227
openshiftTransport, err := rest.TransportFor(testConfig)
228228
require.NoError(t, err)
229229

230-
backendImage := "nginxdemos/nginx-hello:plain-text"
230+
backendImage := "registry.k8s.io/e2e-test-images/agnhost:2.53"
231231

232232
upstreamCA, upstreamCert, upstreamKey, err := createCAandCertSet("localhost")
233233
require.NoError(t, err, "Error creating upstream TLS certificates")

test/e2e/util.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,7 @@ func newOAuthProxyPod(proxyImage, backendImage string, suffix string, extraProxy
856856
{
857857
Image: backendImage,
858858
Name: "hello-openshift",
859+
Args: []string{"netexec", "--http-port=8080"},
859860
SecurityContext: &v1.SecurityContext{
860861
AllowPrivilegeEscalation: pointer.Bool(false),
861862
Capabilities: &v1.Capabilities{Drop: []v1.Capability{"ALL"}},

0 commit comments

Comments
 (0)