From 04a64834701d40787a40bb28c5da7b3c2b7af283 Mon Sep 17 00:00:00 2001 From: Matej Kralik Date: Mon, 16 Sep 2024 23:44:27 +0200 Subject: [PATCH] [OSSM-8141] Fix missing Tproxy label in httpbin deployment (when TProxy=true) + changed apps in native sidecars test from TProxy to normal variant (#741) * Fix missing Tproxy label in httpbin deployment (when TProxy=true) * Change apps in native sidecars test from TProxy to normal variant --- pkg/app/httpbin.go | 1 + pkg/tests/tasks/injection/native_sidecars_test.go | 4 ++-- pkg/tests/tasks/injection/tproxy_test.go | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/app/httpbin.go b/pkg/app/httpbin.go index 1bd9fa42..f1afd01a 100644 --- a/pkg/app/httpbin.go +++ b/pkg/app/httpbin.go @@ -98,6 +98,7 @@ func (a *httpbin) values() map[string]interface{} { "InjectSidecar": a.injectSidecar, "Name": a.deploymentName, "Version": a.versionLabel, + "Tproxy": a.tproxy, } } diff --git a/pkg/tests/tasks/injection/native_sidecars_test.go b/pkg/tests/tasks/injection/native_sidecars_test.go index 7ad91266..ebc1d4c7 100644 --- a/pkg/tests/tasks/injection/native_sidecars_test.go +++ b/pkg/tests/tasks/injection/native_sidecars_test.go @@ -53,8 +53,8 @@ func TestNativeSidecars(t *testing.T) { oc.ApplyTemplate(t, meshNamespace, meshTmpl, meshValues) oc.WaitSMCPReady(t, meshNamespace, "basic") - t.LogStep("Install httpbin and sleep in mode") - app.InstallAndWaitReady(t, app.HttpbinTproxy(ns.Foo), app.SleepTroxy(ns.Foo)) + t.LogStep("Install httpbin and sleep app") + app.InstallAndWaitReady(t, app.Httpbin(ns.Foo), app.Sleep(ns.Foo)) t.NewSubTest("HTTP request from ingress gateway to httpbin in mode").Run(func(t TestHelper) { oc.ApplyFile(t, ns.Foo, "https://raw.githubusercontent.com/maistra/istio/maistra-2.6/samples/httpbin/httpbin-gateway.yaml") diff --git a/pkg/tests/tasks/injection/tproxy_test.go b/pkg/tests/tasks/injection/tproxy_test.go index dcff36aa..7033efa1 100644 --- a/pkg/tests/tasks/injection/tproxy_test.go +++ b/pkg/tests/tasks/injection/tproxy_test.go @@ -40,6 +40,8 @@ func TestTproxy(t *testing.T) { } t.Cleanup(func() { + t.LogStep("Remove privileged SCC from the app namespace") + shell.Executef(t, "oc adm policy remove-scc-from-group privileged system:serviceaccounts:%s", ns.Foo) oc.RecreateNamespace(t, ns.Foo) })