diff --git a/changelog/v1.16.24/go-123.yaml b/changelog/v1.16.24/go-123.yaml new file mode 100644 index 00000000000..f140f9476ca --- /dev/null +++ b/changelog/v1.16.24/go-123.yaml @@ -0,0 +1,8 @@ +changelog: + - type: DEPENDENCY_BUMP + description: Bumped the go version to 1.23.3 + dependencyOwner: golang + dependencyRepo: go + dependencyTag: v1.23.3 + issueLink: https://github.com/solo-io/solo-projects/issues/7609 + resolvesIssue: false \ No newline at end of file diff --git a/ci/cloudbuild/publish-artifacts.yaml b/ci/cloudbuild/publish-artifacts.yaml index 62c4f9b0dd5..d36e9c10c50 100644 --- a/ci/cloudbuild/publish-artifacts.yaml +++ b/ci/cloudbuild/publish-artifacts.yaml @@ -1,6 +1,6 @@ steps: -- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.8.8' +- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.10.2' id: 'prepare-workspace' args: - '--repo-name' @@ -44,7 +44,7 @@ steps: - 'us-central1-a' # Run make targets to push docker images to quay.io -- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8' +- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2' id: 'publish-docker' args: - 'publish-docker' @@ -65,7 +65,7 @@ steps: waitFor: - 'publish-docker' -- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8' +- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2' id: 'release-chart' dir: *dir args: @@ -80,7 +80,7 @@ steps: - 'gcr-auth' # Run make targets to retag and push docker images to GCR -- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8' +- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2' id: 'docker-push-extended-gcr' dir: *dir args: diff --git a/ci/cloudbuild/run-tests.yaml b/ci/cloudbuild/run-tests.yaml index 7754d8ff767..c4305a5cf20 100644 --- a/ci/cloudbuild/run-tests.yaml +++ b/ci/cloudbuild/run-tests.yaml @@ -1,6 +1,6 @@ steps: -- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.8.8' +- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.10.2' id: 'prepare-workspace' args: - '--repo-name' @@ -23,7 +23,7 @@ steps: cd /go/pkg gsutil cat gs://$PROJECT_ID-cache/gloo/gloo-mod.tar.gz | tar -xzf - || echo "untar mod cache failed; continuing because we can download deps as we need them" -- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8' +- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2' id: 'prepare-envoy' dir: *dir entrypoint: 'bash' @@ -74,7 +74,7 @@ steps: waitFor: - 'prepare-gcr-zone' -- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.8.8' +- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.10.2' id: 'prepare-test-tools' dir: *dir args: @@ -85,7 +85,7 @@ steps: - 'prepare-gcr-zone' - 'prepare-test-credentials' -- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8' +- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2' id: 'run-tests' dir: *dir entrypoint: 'make' @@ -96,7 +96,7 @@ steps: secretEnv: - 'JWT_PRIVATE_KEY' -- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8' +- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2' id: 'run-e2e-tests' dir: *dir entrypoint: 'make' @@ -107,7 +107,7 @@ steps: secretEnv: - 'JWT_PRIVATE_KEY' -- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.8.8' +- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.10.2' id: 'run-hashicorp-e2e-tests' dir: *dir entrypoint: 'make' diff --git a/cloudbuild-cache.yaml b/cloudbuild-cache.yaml index 998084a1e57..a7eeea41fb8 100644 --- a/cloudbuild-cache.yaml +++ b/cloudbuild-cache.yaml @@ -1,6 +1,6 @@ options: env: - - "_GO_VERSION=1.21.5" + - "_GO_VERSION=1.23.3" steps: - name: gcr.io/cloud-builders/gsutil diff --git a/go.mod b/go.mod index e99d5d07dde..1ab2361c2d9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/solo-io/gloo -go 1.21.11 +go 1.23.3 // Note for developers: upgrading go will also require upgrading go in the following files: // ./cloudbuild-cache.yaml, diff --git a/test/kube2e/gloo/eds_test.go b/test/kube2e/gloo/eds_test.go new file mode 100644 index 00000000000..835aab54a9b --- /dev/null +++ b/test/kube2e/gloo/eds_test.go @@ -0,0 +1,111 @@ +package gloo_test + +import ( + "os/exec" + + "github.com/google/uuid" + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + gatewayv1 "github.com/solo-io/gloo/projects/gateway/pkg/api/v1" + gloov1 "github.com/solo-io/gloo/projects/gloo/pkg/api/v1" + "github.com/solo-io/gloo/projects/gloo/pkg/api/v1/gloosnapshot" + "github.com/solo-io/gloo/test/helpers" + "github.com/solo-io/gloo/test/kube2e" + "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" + + "github.com/solo-io/solo-kit/pkg/api/v1/clients" +) + +const ( + testServerName = "testserver" + testServerPort = 1234 +) + +var _ = Describe("EDS", func() { + var ( + testServerDestination *gloov1.Destination + testServerVs *gatewayv1.VirtualService + + glooResources *gloosnapshot.ApiSnapshot + ) + + BeforeEach(func() { + // Create a VirtualService routing directly to the testServer kubernetes service + testServerDestination = &gloov1.Destination{ + DestinationType: &gloov1.Destination_Kube{ + Kube: &gloov1.KubernetesServiceDestination{ + Ref: &core.ResourceRef{ + Namespace: testHelper.InstallNamespace, + Name: testServerName, + }, + Port: uint32(testServerPort), + }, + }, + } + testServerVs = helpers.NewVirtualServiceBuilder(). + WithName(testServerName). + WithNamespace(testHelper.InstallNamespace). + WithLabel(kube2e.UniqueTestResourceLabel, uuid.New().String()). + WithDomain(testServerName). + WithRoutePrefixMatcher(testServerName, "/"). + WithRouteActionToSingleDestination(testServerName, testServerDestination). + Build() + + // The set of resources that these tests will generate + glooResources = &gloosnapshot.ApiSnapshot{ + VirtualServices: gatewayv1.VirtualServiceList{ + // many tests route to the TestServer Service so it makes sense to just + // always create it + // the other benefit is this ensures that all tests start with a valid Proxy CR + testServerVs, + }, + } + }) + + JustBeforeEach(func() { + err := snapshotWriter.WriteSnapshot(glooResources, clients.WriteOpts{ + Ctx: ctx, + OverwriteExisting: false, + }) + Expect(err).NotTo(HaveOccurred()) + }) + + JustAfterEach(func() { + err := snapshotWriter.DeleteSnapshot(glooResources, clients.DeleteOpts{ + Ctx: ctx, + IgnoreNotExist: true, + }) + Expect(err).NotTo(HaveOccurred()) + }) + + Context("Rest EDS", Ordered, func() { + BeforeAll(func() { + // enable REST EDS + kube2e.UpdateRestEdsSetting(ctx, true, testHelper.InstallNamespace) + }) + + AfterAll(func() { + // reset REST EDS to default + kube2e.UpdateRestEdsSetting(ctx, false, testHelper.InstallNamespace) + }) + + // This test is inspired by the issue here: https://github.com/solo-io/gloo/issues/8968 + // There were some versions of Gloo Edge 1.15.x which depended on versions of envoy-gloo + // which did not have REST config subscription enabled, and so gateway-proxy logs would + // contain warnings about not finding a registered config subscription factory implementation + // for REST EDS. This test validates that we have not regressed to that state. + It("should not warn when REST EDS is configured", func() { + Consistently(func(g Gomega) { + // Get envoy logs from gateway-proxy deployment + logsCmd := exec.Command("kubectl", "logs", "-n", testHelper.InstallNamespace, + "deployment/gateway-proxy") + logsOut, err := logsCmd.Output() + g.Expect(err).NotTo(HaveOccurred()) + + // ensure that the logs do not contain any presence of the text: + // Didn't find a registered config subscription factory implementation for name: 'envoy.config_subscription.rest' + g.Expect(string(logsOut)).NotTo(ContainSubstring("Didn't find a registered config subscription factory implementation for name: 'envoy.config_subscription.rest'")) + }, "10s", "1s").Should(Succeed()) + }) + }) +}) diff --git a/test/kube2e/gloo/happypath_test.go b/test/kube2e/gloo/happypath_test.go index da0d1773ed6..4b54af5abe1 100644 --- a/test/kube2e/gloo/happypath_test.go +++ b/test/kube2e/gloo/happypath_test.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/solo-io/gloo/test/services/envoy" + corev1 "k8s.io/api/core/v1" - envoy_config_core_v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" "github.com/golang/protobuf/ptypes/wrappers" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" @@ -22,10 +22,8 @@ import ( "github.com/solo-io/solo-kit/pkg/api/v1/resources/core" skkubeutils "github.com/solo-io/solo-kit/pkg/utils/kubeutils" "github.com/solo-io/solo-kit/test/helpers" - kubev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" - "k8s.io/client-go/rest" ) var _ = Describe("Happy path", func() { @@ -34,27 +32,6 @@ var _ = Describe("Happy path", func() { testClients services.TestClients envoyInstance *envoy.Instance tu *v1helpers.TestUpstream - - testCases = []struct { - Title string - RestEdsEnabled *wrappers.BoolValue - TransportApiVersion envoy_config_core_v3.ApiVersion - }{ - { - Title: "Rest Eds Enabled", - RestEdsEnabled: &wrappers.BoolValue{ - Value: true, - }, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - }, - { - Title: "Rest Eds Disabled", - RestEdsEnabled: &wrappers.BoolValue{ - Value: false, - }, - TransportApiVersion: envoy_config_core_v3.ApiVersion_V3, - }, - } ) BeforeEach(func() { @@ -71,222 +48,220 @@ var _ = Describe("Happy path", func() { v1helpers.TestUpstreamReachableWithOffset(3, envoyInstance.HttpPort, tu, nil) } - for _, testCase := range testCases { - - Describe(fmt.Sprintf("%s: (%s)", testCase.Title, testCase.TransportApiVersion.String()), func() { - - Describe("kubernetes happy path", func() { - - var ( - testNamespace string - writeNamespace string - cfg *rest.Config - kubeClient kubernetes.Interface - svc *kubev1.Service - ) - - BeforeEach(func() { - testNamespace = "" - writeNamespace = "" - var err error - svc = nil - cfg, err = kubeutils.GetConfig("", "") - Expect(err).NotTo(HaveOccurred()) - kubeClient, err = kubernetes.NewForConfig(cfg) - Expect(err).NotTo(HaveOccurred()) - }) + Describe("kubernetes happy path", func() { - AfterEach(func() { - if testNamespace != "" { - err := kubeClient.CoreV1().Namespaces().Delete(ctx, testNamespace, metav1.DeleteOptions{}) - Expect(err).NotTo(HaveOccurred()) - } - }) + var ( + testNamespace string + writeNamespace string + kubeClient kubernetes.Interface + svc *corev1.Service + ) - prepNamespace := func() { - if testNamespace == "" { - testNamespace = "gloo-e2e-" + helpers.RandString(8) - } + BeforeEach(func() { + testNamespace = "" + writeNamespace = "" + svc = nil - _, err := kubeClient.CoreV1().Namespaces().Create(ctx, &kubev1.Namespace{ - ObjectMeta: metav1.ObjectMeta{ - Name: testNamespace, - }, - }, metav1.CreateOptions{}) - Expect(err).NotTo(HaveOccurred()) + cfg, err := kubeutils.GetConfig("", "") + Expect(err).NotTo(HaveOccurred()) + kubeClient, err = kubernetes.NewForConfig(cfg) + Expect(err).NotTo(HaveOccurred()) - svc, err = kubeClient.CoreV1().Services(testNamespace).Create(ctx, &kubev1.Service{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: testNamespace, - Name: "headlessservice", - }, - Spec: kubev1.ServiceSpec{ - Ports: []kubev1.ServicePort{ - { - Name: "foo", - Port: int32(tu.Port), - }, - }, - }, - }, metav1.CreateOptions{}) - Expect(err).NotTo(HaveOccurred()) + kubeClient, err = kubernetes.NewForConfig(cfg) + Expect(err).NotTo(HaveOccurred()) + }) - _, err = kubeClient.CoreV1().Endpoints(testNamespace).Create(ctx, &kubev1.Endpoints{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: testNamespace, - Name: svc.Name, + AfterEach(func() { + if testNamespace != "" { + err := kubeClient.CoreV1().Namespaces().Delete(ctx, testNamespace, metav1.DeleteOptions{}) + Expect(err).NotTo(HaveOccurred()) + } + }) + + prepNamespace := func() { + if testNamespace == "" { + testNamespace = "gloo-e2e-" + helpers.RandString(8) + } + + _, err := kubeClient.CoreV1().Namespaces().Create(ctx, &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: testNamespace, + }, + }, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + svc, err = kubeClient.CoreV1().Services(testNamespace).Create(ctx, &corev1.Service{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: testNamespace, + Name: "headlessservice", + }, + Spec: corev1.ServiceSpec{ + Ports: []corev1.ServicePort{ + { + Name: "foo", + Port: int32(tu.Port), }, - Subsets: []kubev1.EndpointSubset{{ - Addresses: []kubev1.EndpointAddress{{ - IP: getNonSpecialIP(envoyInstance), - Hostname: "localhost", - }}, - Ports: []kubev1.EndpointPort{{ - Port: int32(tu.Port), - }}, - }}, - }, metav1.CreateOptions{}) - Expect(err).NotTo(HaveOccurred()) + }, + }, + }, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + _, err = kubeClient.CoreV1().Endpoints(testNamespace).Create(ctx, &corev1.Endpoints{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: testNamespace, + Name: svc.Name, + }, + Subsets: []corev1.EndpointSubset{{ + Addresses: []corev1.EndpointAddress{{ + IP: getNonSpecialIP(envoyInstance), + Hostname: "localhost", + }}, + Ports: []corev1.EndpointPort{{ + Port: int32(tu.Port), + }}, + }}, + }, metav1.CreateOptions{}) + Expect(err).NotTo(HaveOccurred()) + } + + getUpstream := func() (*gloov1.Upstream, error) { + l, err := testClients.UpstreamClient.List(writeNamespace, clients.ListOpts{}) + if err != nil { + return nil, err + } + for _, u := range l { + if strings.Contains(u.Metadata.Name, svc.Name) && strings.Contains(u.Metadata.Name, svc.Namespace) { + return u, nil } + } + return nil, fmt.Errorf("not found") + } - getUpstream := func() (*gloov1.Upstream, error) { - l, err := testClients.UpstreamClient.List(writeNamespace, clients.ListOpts{}) - if err != nil { - return nil, err - } - for _, u := range l { - if strings.Contains(u.Metadata.Name, svc.Name) && strings.Contains(u.Metadata.Name, svc.Namespace) { - return u, nil - } - } - return nil, fmt.Errorf("not found") + Context("specific namespace", func() { + + BeforeEach(func() { + prepNamespace() + writeNamespace = testNamespace + ro := &services.RunOptions{ + NsToWrite: writeNamespace, + NsToWatch: []string{testNamespace}, + WhatToRun: services.What{ + DisableGateway: true, + }, + KubeClient: kubeClient, + Settings: &gloov1.Settings{ + Gloo: &gloov1.GlooOptions{ + EnableRestEds: &wrappers.BoolValue{ + Value: false, + }, + }, + }, } - Context("specific namespace", func() { + testClients = services.RunGlooGatewayUdsFds(ctx, ro) + role := testNamespace + "~" + gatewaydefaults.GatewayProxyName + err := envoyInstance.RunWithRole(role, testClients.GlooPort) + Expect(err).NotTo(HaveOccurred()) - BeforeEach(func() { - prepNamespace() - writeNamespace = testNamespace - ro := &services.RunOptions{ - NsToWrite: writeNamespace, - NsToWatch: []string{testNamespace}, - WhatToRun: services.What{ - DisableGateway: true, - }, - KubeClient: kubeClient, - Settings: &gloov1.Settings{ - Gloo: &gloov1.GlooOptions{ - EnableRestEds: testCase.RestEdsEnabled, - }, - }, - } - - testClients = services.RunGlooGatewayUdsFds(ctx, ro) - role := testNamespace + "~" + gatewaydefaults.GatewayProxyName - err := envoyInstance.RunWithRole(role, testClients.GlooPort) - Expect(err).NotTo(HaveOccurred()) - - testhelpers.EventuallyResourceAccepted(func() (resources.InputResource, error) { - return getUpstream() - }, "20s", ".5s") - }) - - It("should discover service", func() { - up, err := getUpstream() - Expect(err).NotTo(HaveOccurred()) - - proxycli := testClients.ProxyClient - proxy := getTrivialProxyForUpstream(testNamespace, envoyInstance.HttpPort, up.Metadata.Ref()) - var opts clients.WriteOpts - _, err = proxycli.Write(proxy, opts) - Expect(err).NotTo(HaveOccurred()) - - TestUpstreamReachable() - }) - - It("should create appropriate config for discovered service", func() { - up, err := getUpstream() - Expect(err).NotTo(HaveOccurred()) - - svc.Annotations = map[string]string{ - "gloo.solo.io/upstream_config": "{\"initial_stream_window_size\": 2048}", - } - svc, err = kubeClient.CoreV1().Services(testNamespace).Update(ctx, svc, metav1.UpdateOptions{}) - Expect(err).NotTo(HaveOccurred()) - - proxycli := testClients.ProxyClient - proxy := getTrivialProxyForUpstream(testNamespace, envoyInstance.HttpPort, up.Metadata.Ref()) - var opts clients.WriteOpts - _, err = proxycli.Write(proxy, opts) - Expect(err).NotTo(HaveOccurred()) - - TestUpstreamReachable() - upstream, err := getUpstream() - Expect(err).NotTo(HaveOccurred()) - Expect(int(upstream.GetInitialStreamWindowSize().GetValue())).To(Equal(2048)) - }) - - It("correctly routes requests to a service destination", func() { - svcRef := skkubeutils.FromKubeMeta(svc.ObjectMeta, true).Ref() - svcPort := svc.Spec.Ports[0].Port - proxy := getTrivialProxyForService(testNamespace, envoyInstance.HttpPort, svcRef, uint32(svcPort)) - - _, err := testClients.ProxyClient.Write(proxy, clients.WriteOpts{}) - Expect(err).NotTo(HaveOccurred()) - - TestUpstreamReachable() - }) - }) + testhelpers.EventuallyResourceAccepted(func() (resources.InputResource, error) { + return getUpstream() + }, "20s", ".5s") + }) - Context("all namespaces", func() { - BeforeEach(func() { - testNamespace = "gloo-e2e-" + helpers.RandString(8) - prepNamespace() - - writeNamespace = testNamespace - ro := &services.RunOptions{ - NsToWrite: writeNamespace, - NsToWatch: []string{}, - WhatToRun: services.What{ - DisableGateway: true, - }, - KubeClient: kubeClient, - Settings: &gloov1.Settings{ - Gloo: &gloov1.GlooOptions{ - EnableRestEds: testCase.RestEdsEnabled, - }, - }, - } + It("should discover service", func() { + up, err := getUpstream() + Expect(err).NotTo(HaveOccurred()) - testClients = services.RunGlooGatewayUdsFds(ctx, ro) - role := testNamespace + "~" + gatewaydefaults.GatewayProxyName - err := envoyInstance.RunWithRole(role, testClients.GlooPort) - Expect(err).NotTo(HaveOccurred()) + proxycli := testClients.ProxyClient + proxy := getTrivialProxyForUpstream(testNamespace, envoyInstance.HttpPort, up.Metadata.Ref()) + var opts clients.WriteOpts + _, err = proxycli.Write(proxy, opts) + Expect(err).NotTo(HaveOccurred()) - }) + TestUpstreamReachable() + }) - It("watch all namespaces", func() { - testhelpers.EventuallyResourceAccepted(func() (resources.InputResource, error) { - return getUpstream() - }) + It("should create appropriate config for discovered service", func() { + up, err := getUpstream() + Expect(err).NotTo(HaveOccurred()) - up, err := getUpstream() - Expect(err).NotTo(HaveOccurred()) + svc.Annotations = map[string]string{ + "gloo.solo.io/upstream_config": "{\"initial_stream_window_size\": 2048}", + } + svc, err = kubeClient.CoreV1().Services(testNamespace).Update(ctx, svc, metav1.UpdateOptions{}) + Expect(err).NotTo(HaveOccurred()) + + proxycli := testClients.ProxyClient + proxy := getTrivialProxyForUpstream(testNamespace, envoyInstance.HttpPort, up.Metadata.Ref()) + var opts clients.WriteOpts + _, err = proxycli.Write(proxy, opts) + Expect(err).NotTo(HaveOccurred()) + + TestUpstreamReachable() + upstream, err := getUpstream() + Expect(err).NotTo(HaveOccurred()) + Expect(int(upstream.GetInitialStreamWindowSize().GetValue())).To(Equal(2048)) + }) - proxycli := testClients.ProxyClient - proxy := getTrivialProxyForUpstream(testNamespace, envoyInstance.HttpPort, up.Metadata.Ref()) - var opts clients.WriteOpts - _, err = proxycli.Write(proxy, opts) - Expect(err).NotTo(HaveOccurred()) + It("correctly routes requests to a service destination", func() { + svcRef := skkubeutils.FromKubeMeta(svc.ObjectMeta, true).Ref() + svcPort := svc.Spec.Ports[0].Port + proxy := getTrivialProxyForService(testNamespace, envoyInstance.HttpPort, svcRef, uint32(svcPort)) - TestUpstreamReachable() - }) - }) + _, err := testClients.ProxyClient.Write(proxy, clients.WriteOpts{}) + Expect(err).NotTo(HaveOccurred()) + + TestUpstreamReachable() }) }) - } + Context("all namespaces", func() { + BeforeEach(func() { + testNamespace = "gloo-e2e-" + helpers.RandString(8) + prepNamespace() + + writeNamespace = testNamespace + ro := &services.RunOptions{ + NsToWrite: writeNamespace, + NsToWatch: []string{}, + WhatToRun: services.What{ + DisableGateway: true, + }, + KubeClient: kubeClient, + Settings: &gloov1.Settings{ + Gloo: &gloov1.GlooOptions{ + EnableRestEds: &wrappers.BoolValue{ + Value: false, + }, + }, + }, + } + + testClients = services.RunGlooGatewayUdsFds(ctx, ro) + role := testNamespace + "~" + gatewaydefaults.GatewayProxyName + err := envoyInstance.RunWithRole(role, testClients.GlooPort) + Expect(err).NotTo(HaveOccurred()) + + }) + It("watch all namespaces", func() { + testhelpers.EventuallyResourceAccepted(func() (resources.InputResource, error) { + return getUpstream() + }) + + up, err := getUpstream() + Expect(err).NotTo(HaveOccurred()) + + proxycli := testClients.ProxyClient + proxy := getTrivialProxyForUpstream(testNamespace, envoyInstance.HttpPort, up.Metadata.Ref()) + var opts clients.WriteOpts + _, err = proxycli.Write(proxy, opts) + Expect(err).NotTo(HaveOccurred()) + + TestUpstreamReachable() + }) + }) + }) }) func getTrivialProxyForUpstream(ns string, bindPort uint32, upstream *core.ResourceRef) *gloov1.Proxy {