Skip to content

Commit

Permalink
remove gloo-proxy prefix from e2e tests (#10630)
Browse files Browse the repository at this point in the history
Signed-off-by: Jenny Shu <[email protected]>
  • Loading branch information
jenshu authored Feb 14, 2025
1 parent eac9a06 commit 16dee68
Show file tree
Hide file tree
Showing 28 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/client_tls/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
// When we apply the deployer-provision.yaml file, we expect resources to be created with this metadata
glooProxyObjectMeta = func(ns string) metav1.ObjectMeta {
return metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (s *istioIntegrationDeployerSuite) AfterTest(suiteName, testName string) {
func (s *istioIntegrationDeployerSuite) TestConfigureIstioIntegrationFromGatewayParameters() {
// Assert Istio integration is enabled and correct Istio image is set
listOpts := metav1.ListOptions{
LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw",
LabelSelector: "app.kubernetes.io/name=gw",
}
matcher := gomega.And(
matchers.PodMatches(matchers.ExpectedPod{ContainerName: istio.SDSContainerName}),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: gloo-proxy-gw
name: gw
annotations:
gateway.kgateway.dev/gateway-parameters-name: "gw-params"
spec:
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/deployer/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var (

// When we apply the deployer-provision.yaml file, we expect resources to be created with this metadata
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyDeployment = &appsv1.Deployment{ObjectMeta: glooProxyObjectMeta}
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/directresponse/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (s *testingSuite) BeforeTest(suiteName, testName string) {
// so let's assert the proxy svc and pod is ready before moving on
s.ti.Assertions.EventuallyObjectsExist(s.ctx, proxyService, proxyDeployment)
s.ti.Assertions.EventuallyPodsRunning(s.ctx, proxyDeployment.ObjectMeta.GetNamespace(), metav1.ListOptions{
LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw",
LabelSelector: "app.kubernetes.io/name=gw",
})
}

Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/directresponse/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
invalidBackendRefFilterManifests = filepath.Join(fsutils.MustGetThisDir(), "testdata", "invalid-backendRef-filter.yaml")

glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
gwRouteMeta = metav1.ObjectMeta{
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/headless_svc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
var (
// When we apply the manifest file, we expect resources to be created with this metadata
k8sApiProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
k8sApiProxyDeployment = &appsv1.Deployment{ObjectMeta: k8sApiProxyObjectMeta}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (s *testingSuite) BeforeTest(suiteName, testName string) {
// so let's assert the proxy svc and pod is ready before moving on
s.testInstallation.Assertions.EventuallyObjectsExist(s.ctx, proxyService, proxyDeployment)
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, proxyDeployment.ObjectMeta.GetNamespace(), metav1.ListOptions{
LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw",
LabelSelector: "app.kubernetes.io/name=gw",
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ var (

// When we apply the setup file, we expect resources to be created with this metadata
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyService = &corev1.Service{ObjectMeta: glooProxyObjectMeta}
proxyDeployment = &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (s *istioAutoMtlsTestingSuite) BeforeTest(suiteName, testName string) {
s.testInstallation.Assertions.EventuallyObjectsExist(s.ctx, proxyService, proxyDeployment)
// Check that test resources are running
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, proxyDeployment.ObjectMeta.GetNamespace(),
metav1.ListOptions{LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw"}, time.Minute*2)
metav1.ListOptions{LabelSelector: "app.kubernetes.io/name=gw"}, time.Minute*2)
}

func (s *istioAutoMtlsTestingSuite) AfterTest(suiteName, testName string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (s *istioTestingSuite) BeforeTest(suiteName, testName string) {
s.testInstallation.Assertions.EventuallyObjectsExist(s.ctx, proxyService, proxyDeployment)
// Check that test resources are running. This can take a little longer for Istio tests due to the istio-proxy and sds sidecars
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, proxyDeployment.ObjectMeta.GetNamespace(),
metav1.ListOptions{LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw"}, time.Minute*2)
metav1.ListOptions{LabelSelector: "app.kubernetes.io/name=gw"}, time.Minute*2)
}

func (s *istioTestingSuite) AfterTest(suiteName, testName string) {
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/istio/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (

// When we apply the fault injection manifest files, we expect resources to be created with this metadata
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyDeployment = &appsv1.Deployment{ObjectMeta: glooProxyObjectMeta}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (s *testingSuite) SetupSuite() {
LabelSelector: "app.kubernetes.io/name=curl",
})
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, proxyDeployment.ObjectMeta.GetNamespace(), metav1.ListOptions{
LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw",
LabelSelector: "app.kubernetes.io/name=gw",
})

s.manifests = map[string][]string{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ var (

// When we apply the setup file, we expect resources to be created with this metadata
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyService = &corev1.Service{ObjectMeta: glooProxyObjectMeta}
proxyDeployment = &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
},
}
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/metrics/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ var (

// objects
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyDeployment = &appsv1.Deployment{ObjectMeta: glooProxyObjectMeta}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (s *portRoutingTestingSuite) SetupSuite() {
s.testInstallation.Assertions.EventuallyObjectsExist(s.ctx, proxyService, proxyDeployment)
// Check that test resources are running
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, proxyDeployment.ObjectMeta.GetNamespace(),
metav1.ListOptions{LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw"}, time.Minute*2)
metav1.ListOptions{LabelSelector: "app.kubernetes.io/name=gw"}, time.Minute*2)
}

func (s *portRoutingTestingSuite) TearDownSuite() {
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/port_routing/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var (

// When we apply the setup.yaml file, we expect resources to be created with this metadata
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyDeployment = &appsv1.Deployment{ObjectMeta: glooProxyObjectMeta}
Expand Down
4 changes: 2 additions & 2 deletions test/kubernetes/e2e/features/route_delegation/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
var (
commonManifest = filepath.Join(fsutils.MustGetThisDir(), "testdata", "common.yaml")
proxyMeta = metav1.ObjectMeta{
Name: "gloo-proxy-http-gateway",
Name: "http-gateway",
Namespace: "infra",
}
proxyDeployment = &appsv1.Deployment{ObjectMeta: proxyMeta}
Expand Down Expand Up @@ -93,7 +93,7 @@ var (
gatewayTestPort = 8090

proxyTestMeta = metav1.ObjectMeta{
Name: "gloo-proxy-http-gateway-test",
Name: "http-gateway-test",
Namespace: "infra",
}
proxyTestDeployment = &appsv1.Deployment{ObjectMeta: proxyTestMeta}
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/route_options/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (s *testingSuite) SetupSuite() {
LabelSelector: "app.kubernetes.io/name=nginx",
})
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, proxyDeployment.ObjectMeta.GetNamespace(), metav1.ListOptions{
LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw",
LabelSelector: "app.kubernetes.io/name=gw",
})

// We include tests with manual setup here because the cleanup is still automated via AfterTest
Expand Down
4 changes: 2 additions & 2 deletions test/kubernetes/e2e/features/route_options/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ var (

// When we apply the fault injection manifest files, we expect resources to be created with this metadata
proxyService = &corev1.Service{
ObjectMeta: objectMetaInDefault("gloo-proxy-gw"),
ObjectMeta: objectMetaInDefault("gw"),
}
proxyDeployment = &appsv1.Deployment{
ObjectMeta: objectMetaInDefault("gloo-proxy-gw"),
ObjectMeta: objectMetaInDefault("gw"),
}
nginxPod = &corev1.Pod{
ObjectMeta: objectMetaInDefault("nginx"),
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/server_tls/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
// When we apply the deployer-provision.yaml file, we expect resources to be created with this metadata
glooProxyObjectMeta = func(ns string) metav1.ObjectMeta {
return metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: ns,
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/services/httproute/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (

// Proxy resource to be translated
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyDeployment = &appsv1.Deployment{ObjectMeta: glooProxyObjectMeta}
Expand Down
8 changes: 4 additions & 4 deletions test/kubernetes/e2e/features/services/tcproute/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var (
}

singleGlooProxy = metav1.ObjectMeta{
Name: "gloo-proxy-single-tcp-gateway",
Name: "single-tcp-gateway",
Namespace: singleSvcNsName,
}
singleSvcProxyDeployment = &appsv1.Deployment{ObjectMeta: singleGlooProxy}
Expand All @@ -109,7 +109,7 @@ var (
}

multiGlooProxy = metav1.ObjectMeta{
Name: "gloo-proxy-multi-tcp-gateway",
Name: "multi-tcp-gateway",
Namespace: multiSvcNsName,
}
multiProxyDeployment = &appsv1.Deployment{ObjectMeta: multiGlooProxy}
Expand All @@ -125,14 +125,14 @@ var (
}

crossNsGlooProxy = metav1.ObjectMeta{
Name: "gloo-proxy-gateway",
Name: "gateway",
Namespace: crossNsClientName,
}
crossNsProxyDeployment = &appsv1.Deployment{ObjectMeta: crossNsGlooProxy}
crossNsProxyService = &corev1.Service{ObjectMeta: crossNsGlooProxy}

crossNsNoRefGrantGlooProxy = metav1.ObjectMeta{
Name: "gloo-proxy-gateway",
Name: "gateway",
Namespace: crossNsNoRefGrantClientNsName,
}
crossNsNoRefGrantProxyDeployment = &appsv1.Deployment{ObjectMeta: crossNsNoRefGrantGlooProxy}
Expand Down
2 changes: 1 addition & 1 deletion test/kubernetes/e2e/features/upstreams/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var (

// Proxy resource to be translated
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyDeployment = &appsv1.Deployment{ObjectMeta: glooProxyObjectMeta}
Expand Down
4 changes: 2 additions & 2 deletions test/kubernetes/e2e/features/virtualhost_options/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ var (

// When we apply the setup file, we expect resources to be created with this metadata
glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyService = &corev1.Service{ObjectMeta: glooProxyObjectMeta}
proxyDeployment = &appsv1.Deployment{
ObjectMeta: metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (s *testingSuite) SetupSuite() {
})
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, proxyDeployment.ObjectMeta.GetNamespace(),
metav1.ListOptions{
LabelSelector: "app.kubernetes.io/name=gloo-proxy-gw",
LabelSelector: "app.kubernetes.io/name=gw",
})
s.testInstallation.Assertions.EventuallyPodsRunning(s.ctx, testdefaults.CurlPod.GetNamespace(),
metav1.ListOptions{
Expand Down
12 changes: 6 additions & 6 deletions test/kubernetes/e2e/features/zero_downtime_rollout/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ func (s *testingSuite) TestZeroDowntimeRollout() {
// Run this for 30s which is long enough to restart the deployment since there's no easy way
// to stop this command once the test is over
// This executes 800 req @ 4 req/sec = 20s (3 * terminationGracePeriodSeconds (5) + buffer)
// kubectl exec -n hey hey -- hey -disable-keepalive -c 4 -q 10 --cpus 1 -n 1200 -m GET -t 1 -host example.com http://gloo-proxy-gw.default.svc.cluster.local:8080
args := []string{"exec", "-n", "hey", "hey", "--", "hey", "-disable-keepalive", "-c", "4", "-q", "10", "--cpus", "1", "-n", "800", "-m", "GET", "-t", "1", "-host", "example.com", "http://gloo-proxy-gw.default.svc.cluster.local:8080"}
// kubectl exec -n hey hey -- hey -disable-keepalive -c 4 -q 10 --cpus 1 -n 1200 -m GET -t 1 -host example.com http://gw.default.svc.cluster.local:8080
args := []string{"exec", "-n", "hey", "hey", "--", "hey", "-disable-keepalive", "-c", "4", "-q", "10", "--cpus", "1", "-n", "800", "-m", "GET", "-t", "1", "-host", "example.com", "http://gw.default.svc.cluster.local:8080"}

var err error
cmd := s.TestHelper.Cli.Command(s.Ctx, args...)
err = cmd.Start()
Expect(err).ToNot(HaveOccurred())

// Restart the deployment. There should be no downtime since the gloo gateway pod should have the readiness probes configured
err = s.TestHelper.RestartDeploymentAndWait(s.Ctx, "gloo-proxy-gw")
err = s.TestHelper.RestartDeploymentAndWait(s.Ctx, "gw")
Expect(err).ToNot(HaveOccurred())

time.Sleep(1 * time.Second)

// We're just flexing at this point
err = s.TestHelper.RestartDeploymentAndWait(s.Ctx, "gloo-proxy-gw")
err = s.TestHelper.RestartDeploymentAndWait(s.Ctx, "gw")
Expect(err).ToNot(HaveOccurred())

now := time.Now()
Expand Down Expand Up @@ -119,8 +119,8 @@ func (s *testingSuite) TestZeroDowntimeRollout() {
// Status code distribution:
// [200] 779 responses
// Error distribution:
// [17] Get http://gloo-proxy-gw.default.svc.cluster.local:8080: dial tcp 10.96.177.91:8080: connection refused
// [4] Get http://gloo-proxy-gw.default.svc.cluster.local:8080: net/http: request canceled while waiting for connection
// [17] Get http://gw.default.svc.cluster.local:8080: dial tcp 10.96.177.91:8080: connection refused
// [4] Get http://gw.default.svc.cluster.local:8080: net/http: request canceled while waiting for connection

// Verify that there were no errors
Expect(cmd.Output()).To(ContainSubstring("[200] 800 responses"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var (
serviceManifest = filepath.Join(fsutils.MustGetThisDir(), "testdata", "service-for-route.yaml")

glooProxyObjectMeta = metav1.ObjectMeta{
Name: "gloo-proxy-gw",
Name: "gw",
Namespace: "default",
}
proxyDeployment = &appsv1.Deployment{ObjectMeta: glooProxyObjectMeta}
Expand Down

0 comments on commit 16dee68

Please sign in to comment.