From 731b7942797eca81fa86b4e964f3e7260d73727c Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Thu, 10 Jun 2021 11:46:26 +0900 Subject: [PATCH 01/14] Run downstream test with net-istio & mTLS --- Makefile | 12 ++++++++++-- hack/lib/mesh_resources/networkpolicy.yaml | 14 ++++++++++++++ hack/lib/mesh_resources/smcp.yaml | 5 +++++ hack/lib/mesh_resources/smmr.yaml | 12 ++++++++++++ test/e2e-tests.sh | 10 +++++++++- test/lib.bash | 13 ++++++++++++- test/service.go | 3 ++- test/servinge2e/{ => kourier}/custom_route_test.go | 2 +- .../deploy_kn_k8s_svc_in_same_namespace_test.go | 2 +- .../{ => kourier}/service_to_service_test.go | 2 +- test/servinge2e/{ => kourier}/servicemesh_test.go | 2 +- .../{ => kourier}/verify_http_and_https_test.go | 2 +- .../{ => kourier}/verify_route_conflict_test.go | 2 +- 13 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 hack/lib/mesh_resources/networkpolicy.yaml rename test/servinge2e/{ => kourier}/custom_route_test.go (99%) rename test/servinge2e/{ => kourier}/deploy_kn_k8s_svc_in_same_namespace_test.go (99%) rename test/servinge2e/{ => kourier}/service_to_service_test.go (99%) rename test/servinge2e/{ => kourier}/servicemesh_test.go (99%) rename test/servinge2e/{ => kourier}/verify_http_and_https_test.go (98%) rename test/servinge2e/{ => kourier}/verify_route_conflict_test.go (99%) diff --git a/Makefile b/Makefile index 2d8baf9ae2..e931e5c472 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,13 @@ test-e2e: # Run E2E tests from the current repo for serving+eventing+knativeKafka test-e2e-with-kafka: - INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true ./test/e2e-tests.sh + # DO_NOT_SUBBMIT: TODO: Revert this change before merge. + FULL_MESH=true ./test/e2e-tests.sh + # INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true ./test/e2e-tests.sh + +# Run E2E tests from the current repo for serving+eventing+mesh +test-e2e-with-mesh: + FULL_MESH=true ./test/e2e-tests.sh # Run both unit and E2E tests from the current repo. test-operator: test-unit test-e2e @@ -79,7 +85,9 @@ test-upstream-e2e-mesh: # Run upstream E2E tests without upgrades. test-upstream-e2e-no-upgrade: UNINSTALL_STRIMZI="false" ./hack/strimzi.sh - INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true TEST_KNATIVE_E2E=true TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh + # DO_NOT_SUBBMIT: TODO: Revert this change before merge. + FULL_MESH=true TEST_KNATIVE_KAFKA=false TEST_KNATIVE_E2E=true TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh + # INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true TEST_KNATIVE_E2E=true TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh # Run only upstream upgrade tests. test-upstream-upgrade: diff --git a/hack/lib/mesh_resources/networkpolicy.yaml b/hack/lib/mesh_resources/networkpolicy.yaml new file mode 100644 index 0000000000..0e510d3ca8 --- /dev/null +++ b/hack/lib/mesh_resources/networkpolicy.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-from-openshift-monitoring-ns + namespace: knative-serving +spec: + ingress: + - from: + - namespaceSelector: + matchLabels: + name: "openshift-monitoring" + podSelector: {} + policyTypes: + - Ingress diff --git a/hack/lib/mesh_resources/smcp.yaml b/hack/lib/mesh_resources/smcp.yaml index 875a30b8ec..4441b31372 100644 --- a/hack/lib/mesh_resources/smcp.yaml +++ b/hack/lib/mesh_resources/smcp.yaml @@ -7,6 +7,11 @@ spec: profiles: - default proxy: + networking: + trafficControl: + inbound: + excludedPorts: + - 8444 accessLogging: file: name: /dev/stdout diff --git a/hack/lib/mesh_resources/smmr.yaml b/hack/lib/mesh_resources/smmr.yaml index eb4115a93a..f8a091e1b5 100644 --- a/hack/lib/mesh_resources/smmr.yaml +++ b/hack/lib/mesh_resources/smmr.yaml @@ -8,6 +8,16 @@ kind: Namespace metadata: name: serving-tests-alt --- +apiVersion: v1 +kind: Namespace +metadata: + name: serverless-tests +--- +apiVersion: v1 +kind: Namespace +metadata: + name: serverless-tests2 +--- apiVersion: maistra.io/v1 kind: ServiceMeshMemberRoll metadata: @@ -18,3 +28,5 @@ spec: - knative-serving - serving-tests - serving-tests-alt + - serverless-tests + - serverless-tests2 diff --git a/test/e2e-tests.sh b/test/e2e-tests.sh index 2fd30d633b..6411f53d56 100755 --- a/test/e2e-tests.sh +++ b/test/e2e-tests.sh @@ -26,7 +26,15 @@ if [[ $TEST_KNATIVE_KAFKA == true ]]; then install_strimzi serverless_operator_kafka_e2e_tests fi -ensure_serverless_installed + +if [[ $FULL_MESH == "true" ]]; then + UNINSTALL_MESH="false" install_mesh + ensure_serverless_installed + enable_net_istio +else + ensure_serverless_installed +fi + # Run Knative Serving & Eventing downstream E2E tests. downstream_serving_e2e_tests downstream_eventing_e2e_tests diff --git a/test/lib.bash b/test/lib.bash index 04008ca1e5..0ac48c2ea4 100644 --- a/test/lib.bash +++ b/test/lib.bash @@ -116,7 +116,18 @@ function downstream_serving_e2e_tests { # Add system-namespace labels for TestNetworkPolicy and ServiceMesh tests. add_systemnamespace_label - go_test_e2e -failfast -timeout=60m -parallel=1 ./test/servinge2e \ + if [[ $FULL_MESH == "true" ]]; then + export GODEBUG="x509ignoreCN=0" + #go_test_e2e -timeout=60m -parallel=1 ./test/servinge2e/ \ + go_test_e2e -timeout=60m -parallel=1 ./test/servinge2e/ \ + --kubeconfig "${kubeconfigs[0]}" \ + --kubeconfigs "${kubeconfigs_str}" \ + "$@" + fi + + # DO_NOT_SUBBMIT: TODO: Revert this change and add `failfast` option. + #go_test_e2e -failfast -timeout=60m -parallel=1 ./test/servinge2e/... \ + go_test_e2e -timeout=60m -parallel=1 ./test/servinge2e/... \ --kubeconfig "${kubeconfigs[0]}" \ --kubeconfigs "${kubeconfigs_str}" \ "$@" diff --git a/test/service.go b/test/service.go index b0c662ef07..3be2f0eae5 100644 --- a/test/service.go +++ b/test/service.go @@ -176,7 +176,8 @@ func CreateDeployment(ctx *Context, name, namespace, image string) error { Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Labels: map[string]string{ - "app": name, + "app": name, + "maistra.io/expose-route": "true", }, }, Spec: corev1.PodSpec{ diff --git a/test/servinge2e/custom_route_test.go b/test/servinge2e/kourier/custom_route_test.go similarity index 99% rename from test/servinge2e/custom_route_test.go rename to test/servinge2e/kourier/custom_route_test.go index a1a116ab5a..57b9b069ab 100644 --- a/test/servinge2e/custom_route_test.go +++ b/test/servinge2e/kourier/custom_route_test.go @@ -1,4 +1,4 @@ -package servinge2e +package kourier import ( "context" diff --git a/test/servinge2e/deploy_kn_k8s_svc_in_same_namespace_test.go b/test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go similarity index 99% rename from test/servinge2e/deploy_kn_k8s_svc_in_same_namespace_test.go rename to test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go index 4bf3247e7f..cc08cd98bf 100644 --- a/test/servinge2e/deploy_kn_k8s_svc_in_same_namespace_test.go +++ b/test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go @@ -1,4 +1,4 @@ -package servinge2e +package kourier import ( "context" diff --git a/test/servinge2e/service_to_service_test.go b/test/servinge2e/kourier/service_to_service_test.go similarity index 99% rename from test/servinge2e/service_to_service_test.go rename to test/servinge2e/kourier/service_to_service_test.go index b1e77111eb..02d7a484e9 100644 --- a/test/servinge2e/service_to_service_test.go +++ b/test/servinge2e/kourier/service_to_service_test.go @@ -1,4 +1,4 @@ -package servinge2e +package kourier import ( "context" diff --git a/test/servinge2e/servicemesh_test.go b/test/servinge2e/kourier/servicemesh_test.go similarity index 99% rename from test/servinge2e/servicemesh_test.go rename to test/servinge2e/kourier/servicemesh_test.go index 78802ccc98..24ff33d7e3 100644 --- a/test/servinge2e/servicemesh_test.go +++ b/test/servinge2e/kourier/servicemesh_test.go @@ -1,4 +1,4 @@ -package servinge2e +package kourier import ( "context" diff --git a/test/servinge2e/verify_http_and_https_test.go b/test/servinge2e/kourier/verify_http_and_https_test.go similarity index 98% rename from test/servinge2e/verify_http_and_https_test.go rename to test/servinge2e/kourier/verify_http_and_https_test.go index 7c5aacded9..fab94349f6 100644 --- a/test/servinge2e/verify_http_and_https_test.go +++ b/test/servinge2e/kourier/verify_http_and_https_test.go @@ -1,4 +1,4 @@ -package servinge2e +package kourier import ( "crypto/tls" diff --git a/test/servinge2e/verify_route_conflict_test.go b/test/servinge2e/kourier/verify_route_conflict_test.go similarity index 99% rename from test/servinge2e/verify_route_conflict_test.go rename to test/servinge2e/kourier/verify_route_conflict_test.go index 736629f063..eedd42964f 100644 --- a/test/servinge2e/verify_route_conflict_test.go +++ b/test/servinge2e/kourier/verify_route_conflict_test.go @@ -1,4 +1,4 @@ -package servinge2e +package kourier import ( "context" From bb9aa6bca3a126d31d63ea7061e3d1b38c1334e4 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 14 Jul 2021 11:39:38 +0900 Subject: [PATCH 02/14] separate helpers --- test/servinge2e/helpers.go | 51 ++++++------------------------ test/servinge2e/kourier/helpers.go | 50 +++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 41 deletions(-) create mode 100644 test/servinge2e/kourier/helpers.go diff --git a/test/servinge2e/helpers.go b/test/servinge2e/helpers.go index b727379365..dafbd91e7a 100644 --- a/test/servinge2e/helpers.go +++ b/test/servinge2e/helpers.go @@ -2,14 +2,14 @@ package servinge2e import ( "context" + "crypto/tls" + "net/http" "net/url" "testing" "github.com/openshift-knative/serverless-operator/test" - meta "k8s.io/apimachinery/pkg/apis/meta/v1" pkgTest "knative.dev/pkg/test" - servingv1 "knative.dev/serving/pkg/apis/serving/v1" - servingv1alpha1 "knative.dev/serving/pkg/apis/serving/v1alpha1" + "knative.dev/pkg/test/spoof" ) func WaitForRouteServingText(t *testing.T, caCtx *test.Context, routeURL *url.URL, expectedText string) { @@ -21,47 +21,16 @@ func WaitForRouteServingText(t *testing.T, caCtx *test.Context, routeURL *url.UR routeURL, pkgTest.EventuallyMatchesBody(expectedText), "WaitForRouteToServeText", - true); err != nil { + true, + insecureSkipVerify(), + ); err != nil { t.Fatalf("The Route at domain %s didn't serve the expected text \"%s\": %v", routeURL, expectedText, err) } } -func withServiceReadyOrFail(ctx *test.Context, service *servingv1.Service) *servingv1.Service { - service, err := ctx.Clients.Serving.ServingV1().Services(service.Namespace).Create(context.Background(), service, meta.CreateOptions{}) - if err != nil { - ctx.T.Fatalf("Error creating ksvc: %v", err) +func insecureSkipVerify() spoof.TransportOption { + return func(transport *http.Transport) *http.Transport { + transport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} + return transport } - - // Let the ksvc be deleted after test - ctx.AddToCleanup(func() error { - ctx.T.Logf("Cleaning up Knative Service '%s/%s'", service.Namespace, service.Name) - return ctx.Clients.Serving.ServingV1().Services(service.Namespace).Delete(context.Background(), service.Name, meta.DeleteOptions{}) - }) - - service, err = test.WaitForServiceState(ctx, service.Name, service.Namespace, test.IsServiceReady) - if err != nil { - ctx.T.Fatalf("Error waiting for ksvc readiness: %v", err) - } - - return service -} - -func withDomainMappingReadyOrFail(ctx *test.Context, dm *servingv1alpha1.DomainMapping) *servingv1alpha1.DomainMapping { - dm, err := ctx.Clients.Serving.ServingV1alpha1().DomainMappings(dm.Namespace).Create(context.Background(), dm, meta.CreateOptions{}) - if err != nil { - ctx.T.Fatalf("Error creating ksvc: %v", err) - } - - // Let the ksvc be deleted after test - ctx.AddToCleanup(func() error { - ctx.T.Logf("Cleaning up Knative Service '%s/%s'", dm.Namespace, dm.Name) - return ctx.Clients.Serving.ServingV1alpha1().DomainMappings(dm.Namespace).Delete(context.Background(), dm.Name, meta.DeleteOptions{}) - }) - - dm, err = test.WaitForDomainMappingState(ctx, dm.Name, dm.Namespace, test.IsDomainMappingReady) - if err != nil { - ctx.T.Fatalf("Error waiting for ksvc readiness: %v", err) - } - - return dm } diff --git a/test/servinge2e/kourier/helpers.go b/test/servinge2e/kourier/helpers.go new file mode 100644 index 0000000000..0ecfeb3e95 --- /dev/null +++ b/test/servinge2e/kourier/helpers.go @@ -0,0 +1,50 @@ +package kourier + +import ( + "context" + + "github.com/openshift-knative/serverless-operator/test" + meta "k8s.io/apimachinery/pkg/apis/meta/v1" + servingv1 "knative.dev/serving/pkg/apis/serving/v1" + servingv1alpha1 "knative.dev/serving/pkg/apis/serving/v1alpha1" +) + +func withServiceReadyOrFail(ctx *test.Context, service *servingv1.Service) *servingv1.Service { + service, err := ctx.Clients.Serving.ServingV1().Services(service.Namespace).Create(context.Background(), service, meta.CreateOptions{}) + if err != nil { + ctx.T.Fatalf("Error creating ksvc: %v", err) + } + + // Let the ksvc be deleted after test + ctx.AddToCleanup(func() error { + ctx.T.Logf("Cleaning up Knative Service '%s/%s'", service.Namespace, service.Name) + return ctx.Clients.Serving.ServingV1().Services(service.Namespace).Delete(context.Background(), service.Name, meta.DeleteOptions{}) + }) + + service, err = test.WaitForServiceState(ctx, service.Name, service.Namespace, test.IsServiceReady) + if err != nil { + ctx.T.Fatalf("Error waiting for ksvc readiness: %v", err) + } + + return service +} + +func withDomainMappingReadyOrFail(ctx *test.Context, dm *servingv1alpha1.DomainMapping) *servingv1alpha1.DomainMapping { + dm, err := ctx.Clients.Serving.ServingV1alpha1().DomainMappings(dm.Namespace).Create(context.Background(), dm, meta.CreateOptions{}) + if err != nil { + ctx.T.Fatalf("Error creating ksvc: %v", err) + } + + // Let the ksvc be deleted after test + ctx.AddToCleanup(func() error { + ctx.T.Logf("Cleaning up Knative Service '%s/%s'", dm.Namespace, dm.Name) + return ctx.Clients.Serving.ServingV1alpha1().DomainMappings(dm.Namespace).Delete(context.Background(), dm.Name, meta.DeleteOptions{}) + }) + + dm, err = test.WaitForDomainMappingState(ctx, dm.Name, dm.Namespace, test.IsDomainMappingReady) + if err != nil { + ctx.T.Fatalf("Error waiting for ksvc readiness: %v", err) + } + + return dm +} From 62ac63eaa276c83b7a888d5dee72f3b780591ffa Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 14 Jul 2021 12:11:30 +0900 Subject: [PATCH 03/14] Fix lib --- test/servinge2e/kourier/const.go | 11 +++++++++++ .../deploy_kn_k8s_svc_in_same_namespace_test.go | 17 +++++++++-------- .../kourier/verify_http_and_https_test.go | 3 ++- .../kourier/verify_route_conflict_test.go | 3 ++- 4 files changed, 24 insertions(+), 10 deletions(-) create mode 100644 test/servinge2e/kourier/const.go diff --git a/test/servinge2e/kourier/const.go b/test/servinge2e/kourier/const.go new file mode 100644 index 0000000000..356db92436 --- /dev/null +++ b/test/servinge2e/kourier/const.go @@ -0,0 +1,11 @@ +package kourier + +const ( + testNamespace = "serverless-tests" + testNamespace2 = "serverless-tests2" + image = "gcr.io/knative-samples/helloworld-go" + helloworldService = "helloworld-go" + helloworldService2 = "helloworld-go2" + kubeHelloworldService = "kube-helloworld-go" + helloworldText = "Hello World!" +) diff --git a/test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go b/test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go index cc08cd98bf..9ff5e53609 100644 --- a/test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go +++ b/test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/openshift-knative/serverless-operator/test" + "github.com/openshift-knative/serverless-operator/test/servinge2e" routev1 "github.com/openshift/api/route/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -38,7 +39,7 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { } // Check Kube service responds - WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) // Deploy Knative service in the same namespace ksvc, err := test.WithServiceReady(caCtx, helloworldService, testNamespace2, image) @@ -47,14 +48,14 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { } // Check that both services respond - WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) - WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) // Delete Knative service caCtx.Clients.Serving.ServingV1().Services(testNamespace2).Delete(context.Background(), ksvc.Name, metav1.DeleteOptions{}) // Check that Kube service still responds - WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) // Remove the Kube service caCtx.Clients.Route.Routes(testNamespace2).Delete(context.Background(), svc.Name, metav1.DeleteOptions{}) @@ -68,7 +69,7 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { } // Check that Knative service responds - WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) //Create deployment err = test.CreateDeployment(caCtx, kubeHelloworldService, testNamespace2, image) @@ -90,8 +91,8 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { } // Check that both services respond - WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) - WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) // Remove the Kube service caCtx.Clients.Route.Routes(testNamespace2).Delete(context.Background(), svc.Name, metav1.DeleteOptions{}) @@ -99,7 +100,7 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { caCtx.Clients.Kube.AppsV1().Deployments(testNamespace2).Delete(context.Background(), svc.Name, metav1.DeleteOptions{}) // Check that Knative service still responds - WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) // Delete the Knative service caCtx.Clients.Serving.ServingV1().Services(testNamespace2).Delete(context.Background(), ksvc.Name, metav1.DeleteOptions{}) diff --git a/test/servinge2e/kourier/verify_http_and_https_test.go b/test/servinge2e/kourier/verify_http_and_https_test.go index fab94349f6..0680442e26 100644 --- a/test/servinge2e/kourier/verify_http_and_https_test.go +++ b/test/servinge2e/kourier/verify_http_and_https_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/openshift-knative/serverless-operator/test" + "github.com/openshift-knative/serverless-operator/test/servinge2e" ) func TestKnativeServiceHTTPS(t *testing.T) { @@ -22,7 +23,7 @@ func TestKnativeServiceHTTPS(t *testing.T) { } // Implicitly checks that HTTP works. - WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) // Now check that HTTPS works. httpsURL := ksvc.Status.URL.DeepCopy() diff --git a/test/servinge2e/kourier/verify_route_conflict_test.go b/test/servinge2e/kourier/verify_route_conflict_test.go index eedd42964f..a23fa88f50 100644 --- a/test/servinge2e/kourier/verify_route_conflict_test.go +++ b/test/servinge2e/kourier/verify_route_conflict_test.go @@ -8,6 +8,7 @@ import ( "testing" "github.com/openshift-knative/serverless-operator/test" + "github.com/openshift-knative/serverless-operator/test/servinge2e" corev1 "k8s.io/api/core/v1" apierrs "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -49,7 +50,7 @@ func TestRouteConflictBehavior(t *testing.T) { t.Fatal("Knative Service not ready", err) } - WaitForRouteServingText(t, caCtx, olderSvc.Status.URL.URL(), helloworldText) + servinge2e.WaitForRouteServingText(t, caCtx, olderSvc.Status.URL.URL(), helloworldText) _, err = test.CreateService(caCtx, newer.Name, newer.Namespace, image) if err != nil { From 1ff4a956f9e89bcd9a311c90628cd3aa6799b9a0 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 14 Jul 2021 12:17:46 +0900 Subject: [PATCH 04/14] Fix lint --- test/servinge2e/user_permissions_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/servinge2e/user_permissions_test.go b/test/servinge2e/user_permissions_test.go index c11926c22d..c7c0b7f5a0 100644 --- a/test/servinge2e/user_permissions_test.go +++ b/test/servinge2e/user_permissions_test.go @@ -14,13 +14,7 @@ import ( ) const ( - testNamespace = "serverless-tests" - testNamespace2 = "serverless-tests2" - image = "gcr.io/knative-samples/helloworld-go" - helloworldService = "helloworld-go" - helloworldService2 = "helloworld-go2" - kubeHelloworldService = "kube-helloworld-go" - helloworldText = "Hello World!" + testNamespace = "serverless-tests" ) func init() { From 071acbd4144afe29e7e81e16efb59146b563edb3 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 14 Jul 2021 17:45:44 +0900 Subject: [PATCH 05/14] move deploy_kn_k8s_svc_in_same_namespace_test.go --- ...eploy_kn_k8s_svc_in_same_namespace_test.go | 19 +++++++++---------- test/servinge2e/helpers.go | 10 ++++++++++ test/servinge2e/kourier/const.go | 9 ++------- test/servinge2e/user_permissions_test.go | 4 ---- 4 files changed, 21 insertions(+), 21 deletions(-) rename test/servinge2e/{kourier => }/deploy_kn_k8s_svc_in_same_namespace_test.go (87%) diff --git a/test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go b/test/servinge2e/deploy_kn_k8s_svc_in_same_namespace_test.go similarity index 87% rename from test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go rename to test/servinge2e/deploy_kn_k8s_svc_in_same_namespace_test.go index 9ff5e53609..4bf3247e7f 100644 --- a/test/servinge2e/kourier/deploy_kn_k8s_svc_in_same_namespace_test.go +++ b/test/servinge2e/deploy_kn_k8s_svc_in_same_namespace_test.go @@ -1,4 +1,4 @@ -package kourier +package servinge2e import ( "context" @@ -6,7 +6,6 @@ import ( "testing" "github.com/openshift-knative/serverless-operator/test" - "github.com/openshift-knative/serverless-operator/test/servinge2e" routev1 "github.com/openshift/api/route/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -39,7 +38,7 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { } // Check Kube service responds - servinge2e.WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) + WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) // Deploy Knative service in the same namespace ksvc, err := test.WithServiceReady(caCtx, helloworldService, testNamespace2, image) @@ -48,14 +47,14 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { } // Check that both services respond - servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) - servinge2e.WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) + WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) // Delete Knative service caCtx.Clients.Serving.ServingV1().Services(testNamespace2).Delete(context.Background(), ksvc.Name, metav1.DeleteOptions{}) // Check that Kube service still responds - servinge2e.WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) + WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) // Remove the Kube service caCtx.Clients.Route.Routes(testNamespace2).Delete(context.Background(), svc.Name, metav1.DeleteOptions{}) @@ -69,7 +68,7 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { } // Check that Knative service responds - servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) //Create deployment err = test.CreateDeployment(caCtx, kubeHelloworldService, testNamespace2, image) @@ -91,8 +90,8 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { } // Check that both services respond - servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) - servinge2e.WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) + WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + WaitForRouteServingText(t, caCtx, kubeServiceURL, helloworldText) // Remove the Kube service caCtx.Clients.Route.Routes(testNamespace2).Delete(context.Background(), svc.Name, metav1.DeleteOptions{}) @@ -100,7 +99,7 @@ func TestKnativeVersusKubeServicesInOneNamespace(t *testing.T) { caCtx.Clients.Kube.AppsV1().Deployments(testNamespace2).Delete(context.Background(), svc.Name, metav1.DeleteOptions{}) // Check that Knative service still responds - servinge2e.WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) + WaitForRouteServingText(t, caCtx, ksvc.Status.URL.URL(), helloworldText) // Delete the Knative service caCtx.Clients.Serving.ServingV1().Services(testNamespace2).Delete(context.Background(), ksvc.Name, metav1.DeleteOptions{}) diff --git a/test/servinge2e/helpers.go b/test/servinge2e/helpers.go index dafbd91e7a..35593aedf6 100644 --- a/test/servinge2e/helpers.go +++ b/test/servinge2e/helpers.go @@ -12,6 +12,16 @@ import ( "knative.dev/pkg/test/spoof" ) +const ( + testNamespace = "serverless-tests" + testNamespace2 = "serverless-tests2" + image = "gcr.io/knative-samples/helloworld-go" + helloworldService = "helloworld-go" + helloworldService2 = "helloworld-go2" + kubeHelloworldService = "kube-helloworld-go" + helloworldText = "Hello World!" +) + func WaitForRouteServingText(t *testing.T, caCtx *test.Context, routeURL *url.URL, expectedText string) { t.Helper() if _, err := pkgTest.WaitForEndpointState( diff --git a/test/servinge2e/kourier/const.go b/test/servinge2e/kourier/const.go index 356db92436..b6b86a1355 100644 --- a/test/servinge2e/kourier/const.go +++ b/test/servinge2e/kourier/const.go @@ -1,11 +1,6 @@ package kourier const ( - testNamespace = "serverless-tests" - testNamespace2 = "serverless-tests2" - image = "gcr.io/knative-samples/helloworld-go" - helloworldService = "helloworld-go" - helloworldService2 = "helloworld-go2" - kubeHelloworldService = "kube-helloworld-go" - helloworldText = "Hello World!" + image = "gcr.io/knative-samples/helloworld-go" + helloworldText = "Hello World!" ) diff --git a/test/servinge2e/user_permissions_test.go b/test/servinge2e/user_permissions_test.go index c7c0b7f5a0..db32b6d375 100644 --- a/test/servinge2e/user_permissions_test.go +++ b/test/servinge2e/user_permissions_test.go @@ -13,10 +13,6 @@ import ( servingv1 "knative.dev/serving/pkg/apis/serving/v1" ) -const ( - testNamespace = "serverless-tests" -) - func init() { servingv1.AddToScheme(scheme.Scheme) networkingv1alpha1.AddToScheme(scheme.Scheme) From 727113d92a741dedd6b5af6d84fbbd95acee97be Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 14 Jul 2021 18:12:51 +0900 Subject: [PATCH 06/14] Remove const --- test/servinge2e/kourier/const.go | 6 ------ test/servinge2e/kourier/helpers.go | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 test/servinge2e/kourier/const.go diff --git a/test/servinge2e/kourier/const.go b/test/servinge2e/kourier/const.go deleted file mode 100644 index b6b86a1355..0000000000 --- a/test/servinge2e/kourier/const.go +++ /dev/null @@ -1,6 +0,0 @@ -package kourier - -const ( - image = "gcr.io/knative-samples/helloworld-go" - helloworldText = "Hello World!" -) diff --git a/test/servinge2e/kourier/helpers.go b/test/servinge2e/kourier/helpers.go index 0ecfeb3e95..6b98f0aba5 100644 --- a/test/servinge2e/kourier/helpers.go +++ b/test/servinge2e/kourier/helpers.go @@ -9,6 +9,12 @@ import ( servingv1alpha1 "knative.dev/serving/pkg/apis/serving/v1alpha1" ) +const ( + testNamespace = "serverless-tests" + image = "gcr.io/knative-samples/helloworld-go" + helloworldText = "Hello World!" +) + func withServiceReadyOrFail(ctx *test.Context, service *servingv1.Service) *servingv1.Service { service, err := ctx.Clients.Serving.ServingV1().Services(service.Namespace).Create(context.Background(), service, meta.CreateOptions{}) if err != nil { From 9ed0f29d038ea101b53f6ab61eb3f8deee166acd Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 14 Jul 2021 20:10:38 +0900 Subject: [PATCH 07/14] Fix script error --- test/lib.bash | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/test/lib.bash b/test/lib.bash index 0ac48c2ea4..a3b6f26192 100644 --- a/test/lib.bash +++ b/test/lib.bash @@ -118,19 +118,16 @@ function downstream_serving_e2e_tests { if [[ $FULL_MESH == "true" ]]; then export GODEBUG="x509ignoreCN=0" - #go_test_e2e -timeout=60m -parallel=1 ./test/servinge2e/ \ - go_test_e2e -timeout=60m -parallel=1 ./test/servinge2e/ \ + go_test_e2e -failfast -timeout=60m -parallel=1 ./test/servinge2e/ \ + --kubeconfig "${kubeconfigs[0]}" \ + --kubeconfigs "${kubeconfigs_str}" \ + "$@" + else + go_test_e2e -failfast -timeout=60m -parallel=1 ./test/servinge2e/... \ --kubeconfig "${kubeconfigs[0]}" \ --kubeconfigs "${kubeconfigs_str}" \ "$@" fi - - # DO_NOT_SUBBMIT: TODO: Revert this change and add `failfast` option. - #go_test_e2e -failfast -timeout=60m -parallel=1 ./test/servinge2e/... \ - go_test_e2e -timeout=60m -parallel=1 ./test/servinge2e/... \ - --kubeconfig "${kubeconfigs[0]}" \ - --kubeconfigs "${kubeconfigs_str}" \ - "$@" } function downstream_eventing_e2e_tests { From f2599d6ebca9138c63e2924e80b7cf1420fbd71c Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Mon, 26 Jul 2021 17:53:52 +0900 Subject: [PATCH 08/14] Remove none metrics and add deploy_networkpolicy --- hack/lib/mesh.bash | 11 +++++++++++ hack/lib/serverless.bash | 4 ---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/hack/lib/mesh.bash b/hack/lib/mesh.bash index 49847b0c8d..c841685338 100644 --- a/hack/lib/mesh.bash +++ b/hack/lib/mesh.bash @@ -9,11 +9,13 @@ function install_mesh { if [[ ${FULL_MESH:-} == "true" ]]; then deploy_servicemeshcontrolplane deploy_gateways + deploy_networkpolicy fi } function uninstall_mesh { if [[ ${FULL_MESH:-} == "true" ]]; then + undeploy_networkpolicy undeploy_gateways undeploy_servicemeshcontrolplane fi @@ -93,6 +95,10 @@ function deploy_gateways { oc apply -f "${resources_dir}"/peerauthentication.yaml || return $? } +function deploy_networkpolicy { + oc apply -f "${resources_dir}"/networkpolicy.yaml || return $? +} + function undeploy_gateways { oc delete -f "${resources_dir}"/peerauthentication.yaml --ignore-not-found || return $? oc delete -f "${resources_dir}"/gateway.yaml --ignore-not-found || return $? @@ -100,3 +106,8 @@ function undeploy_gateways { oc delete -n cert-manager secret ca-key-pair --ignore-not-found || return $? oc delete -n istio-system secret wildcard-certs --ignore-not-found || return $? } + + +function undeploy_networkpolicy { + oc delete -f "${resources_dir}"/networkpolicy.yaml --ignore-not-found || return $? +} diff --git a/hack/lib/serverless.bash b/hack/lib/serverless.bash index f938cbe284..acfd8d97be 100644 --- a/hack/lib/serverless.bash +++ b/hack/lib/serverless.bash @@ -166,7 +166,6 @@ function deploy_knativeserving_cr { # enable_net_istio adds patch to KnativeServing: # - Set ingress.istio.enbled to "true" # - Set inject and rewriteAppHTTPProbers annotations for activator and autoscaler -# - Override observability.metrics.backend-destination to "none", # as "test/v1alpha1/resources/operator.knative.dev_v1alpha1_knativeserving_cr.yaml" has the value "prometheus". function enable_net_istio { patchfile="$(mktemp -t knative-serving-XXXXX.yaml)" @@ -186,9 +185,6 @@ spec: name: autoscaler - name: domain-mapping replicas: 2 - config: - observability: - metrics.backend-destination: "none" EOF oc patch knativeserving knative-serving \ From 18db639495fb15766499ce119cac13aacf00e9fd Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Tue, 27 Jul 2021 23:16:35 +0900 Subject: [PATCH 09/14] Ship networkpolicy for monitoring --- hack/lib/mesh_resources/networkpolicy.yaml | 14 -------------- .../ingress/0.23/0-networkpolicy-mesh.yaml | 15 +++++++++++++++ .../hack/007-networkpolicy-mesh.patch | 17 ++++++++++++++++- 3 files changed, 31 insertions(+), 15 deletions(-) delete mode 100644 hack/lib/mesh_resources/networkpolicy.yaml diff --git a/hack/lib/mesh_resources/networkpolicy.yaml b/hack/lib/mesh_resources/networkpolicy.yaml deleted file mode 100644 index 0e510d3ca8..0000000000 --- a/hack/lib/mesh_resources/networkpolicy.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: NetworkPolicy -metadata: - name: allow-from-openshift-monitoring-ns - namespace: knative-serving -spec: - ingress: - - from: - - namespaceSelector: - matchLabels: - name: "openshift-monitoring" - podSelector: {} - policyTypes: - - Ingress diff --git a/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml b/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml index ff040cbc2a..0866845923 100644 --- a/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml +++ b/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml @@ -43,3 +43,18 @@ spec: ingress: - {} --- +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-from-openshift-monitoring-ns + namespace: knative-serving +spec: + ingress: + - from: + - namespaceSelector: + matchLabels: + name: "openshift-monitoring" + podSelector: {} + policyTypes: + - Ingress +--- diff --git a/openshift-knative-operator/hack/007-networkpolicy-mesh.patch b/openshift-knative-operator/hack/007-networkpolicy-mesh.patch index 915b2d3332..3f1742466a 100644 --- a/openshift-knative-operator/hack/007-networkpolicy-mesh.patch +++ b/openshift-knative-operator/hack/007-networkpolicy-mesh.patch @@ -3,7 +3,7 @@ new file mode 100644 index 00000000..3d46fbed --- /dev/null +++ b/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml -@@ -0,0 +1,45 @@ +@@ -0,0 +1,60 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: @@ -49,3 +49,18 @@ index 00000000..3d46fbed + ingress: + - {} +--- ++apiVersion: networking.k8s.io/v1 ++kind: NetworkPolicy ++metadata: ++ name: allow-from-openshift-monitoring-ns ++ namespace: knative-serving ++spec: ++ ingress: ++ - from: ++ - namespaceSelector: ++ matchLabels: ++ name: "openshift-monitoring" ++ podSelector: {} ++ policyTypes: ++ - Ingress ++--- From b832fd62e59d52a815cbaa3fcc1a26d78f842286 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Tue, 27 Jul 2021 23:17:44 +0900 Subject: [PATCH 10/14] Remove networkpolicy from mesh.bash --- hack/lib/mesh.bash | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/hack/lib/mesh.bash b/hack/lib/mesh.bash index c841685338..49847b0c8d 100644 --- a/hack/lib/mesh.bash +++ b/hack/lib/mesh.bash @@ -9,13 +9,11 @@ function install_mesh { if [[ ${FULL_MESH:-} == "true" ]]; then deploy_servicemeshcontrolplane deploy_gateways - deploy_networkpolicy fi } function uninstall_mesh { if [[ ${FULL_MESH:-} == "true" ]]; then - undeploy_networkpolicy undeploy_gateways undeploy_servicemeshcontrolplane fi @@ -95,10 +93,6 @@ function deploy_gateways { oc apply -f "${resources_dir}"/peerauthentication.yaml || return $? } -function deploy_networkpolicy { - oc apply -f "${resources_dir}"/networkpolicy.yaml || return $? -} - function undeploy_gateways { oc delete -f "${resources_dir}"/peerauthentication.yaml --ignore-not-found || return $? oc delete -f "${resources_dir}"/gateway.yaml --ignore-not-found || return $? @@ -106,8 +100,3 @@ function undeploy_gateways { oc delete -n cert-manager secret ca-key-pair --ignore-not-found || return $? oc delete -n istio-system secret wildcard-certs --ignore-not-found || return $? } - - -function undeploy_networkpolicy { - oc delete -f "${resources_dir}"/networkpolicy.yaml --ignore-not-found || return $? -} From 57e69ff6bfb17d6983ceb14c313ad38510c903fb Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 28 Jul 2021 00:01:56 +0900 Subject: [PATCH 11/14] Update labels --- .../operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml | 3 +++ openshift-knative-operator/hack/007-networkpolicy-mesh.patch | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml b/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml index 0866845923..4ce25f56c5 100644 --- a/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml +++ b/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml @@ -48,6 +48,9 @@ kind: NetworkPolicy metadata: name: allow-from-openshift-monitoring-ns namespace: knative-serving + labels: + serving.knative.dev/release: devel + networking.knative.dev/ingress-provider: istio spec: ingress: - from: diff --git a/openshift-knative-operator/hack/007-networkpolicy-mesh.patch b/openshift-knative-operator/hack/007-networkpolicy-mesh.patch index 3f1742466a..73b33a3347 100644 --- a/openshift-knative-operator/hack/007-networkpolicy-mesh.patch +++ b/openshift-knative-operator/hack/007-networkpolicy-mesh.patch @@ -3,7 +3,7 @@ new file mode 100644 index 00000000..3d46fbed --- /dev/null +++ b/openshift-knative-operator/cmd/operator/kodata/ingress/0.23/0-networkpolicy-mesh.yaml -@@ -0,0 +1,60 @@ +@@ -0,0 +1,63 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: @@ -54,6 +54,9 @@ index 00000000..3d46fbed +metadata: + name: allow-from-openshift-monitoring-ns + namespace: knative-serving ++ labels: ++ serving.knative.dev/release: devel ++ networking.knative.dev/ingress-provider: istio +spec: + ingress: + - from: From 5d6890b2d394f7e4c0dbcdfd9d30ac987180a1f9 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 28 Jul 2021 08:47:23 +0900 Subject: [PATCH 12/14] Remove unused values --- test/servinge2e/helpers.go | 1 - 1 file changed, 1 deletion(-) diff --git a/test/servinge2e/helpers.go b/test/servinge2e/helpers.go index 35593aedf6..9936b51837 100644 --- a/test/servinge2e/helpers.go +++ b/test/servinge2e/helpers.go @@ -13,7 +13,6 @@ import ( ) const ( - testNamespace = "serverless-tests" testNamespace2 = "serverless-tests2" image = "gcr.io/knative-samples/helloworld-go" helloworldService = "helloworld-go" From c0ce92744ba1078c91c9e036f2e8b9d89b9c4ead Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 28 Jul 2021 16:36:34 +0900 Subject: [PATCH 13/14] Try to run both downstream and upstream in one job. This is a test so I am running both patterns. - test-upstream-e2e-no-upgrade -> test-e2e-with-mesh - test-e2e-with-kafka -> test-upstream-e2e-no-upgrade --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e931e5c472..6d1bc7261a 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ test-e2e: ./test/e2e-tests.sh # Run E2E tests from the current repo for serving+eventing+knativeKafka -test-e2e-with-kafka: +test-e2e-with-kafka: test-upstream-e2e-no-upgrade # DO_NOT_SUBBMIT: TODO: Revert this change before merge. FULL_MESH=true ./test/e2e-tests.sh # INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true ./test/e2e-tests.sh @@ -83,7 +83,7 @@ test-upstream-e2e-mesh: FULL_MESH=true INSTALL_KAFKA=false TEST_KNATIVE_KAFKA=false TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh # Run upstream E2E tests without upgrades. -test-upstream-e2e-no-upgrade: +test-upstream-e2e-no-upgrade: test-e2e-with-mesh UNINSTALL_STRIMZI="false" ./hack/strimzi.sh # DO_NOT_SUBBMIT: TODO: Revert this change before merge. FULL_MESH=true TEST_KNATIVE_KAFKA=false TEST_KNATIVE_E2E=true TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh From d8ce5e27afd0b1cf77135d82e933d5fba02da0da Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Wed, 28 Jul 2021 19:05:09 +0900 Subject: [PATCH 14/14] Cleanup Makefile --- Makefile | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 6d1bc7261a..630ca2ac2a 100644 --- a/Makefile +++ b/Makefile @@ -59,10 +59,8 @@ test-e2e: ./test/e2e-tests.sh # Run E2E tests from the current repo for serving+eventing+knativeKafka -test-e2e-with-kafka: test-upstream-e2e-no-upgrade - # DO_NOT_SUBBMIT: TODO: Revert this change before merge. - FULL_MESH=true ./test/e2e-tests.sh - # INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true ./test/e2e-tests.sh +test-e2e-with-kafka: + INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true ./test/e2e-tests.sh # Run E2E tests from the current repo for serving+eventing+mesh test-e2e-with-mesh: @@ -78,16 +76,14 @@ test-upstream-e2e: # Run upstream E2E tests with net-istio and sidecar. # TODO: Enable upgrade tests once upstream fixed the issue https://github.com/knative/serving/issues/11535. -test-upstream-e2e-mesh: +test-upstream-e2e-mesh: test-e2e-with-mesh UNINSTALL_STRIMZI="false" ./hack/strimzi.sh FULL_MESH=true INSTALL_KAFKA=false TEST_KNATIVE_KAFKA=false TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh # Run upstream E2E tests without upgrades. -test-upstream-e2e-no-upgrade: test-e2e-with-mesh +test-upstream-e2e-no-upgrade: UNINSTALL_STRIMZI="false" ./hack/strimzi.sh - # DO_NOT_SUBBMIT: TODO: Revert this change before merge. - FULL_MESH=true TEST_KNATIVE_KAFKA=false TEST_KNATIVE_E2E=true TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh - # INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true TEST_KNATIVE_E2E=true TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh + INSTALL_KAFKA=true TEST_KNATIVE_KAFKA=true TEST_KNATIVE_E2E=true TEST_KNATIVE_UPGRADE=false ./test/upstream-e2e-tests.sh # Run only upstream upgrade tests. test-upstream-upgrade: