Skip to content

Commit ee195fc

Browse files
authored
Update service labels in NFR tests (#3386)
Problem: The GKE service label for nginx LB is not provided in the helm chart anymore. Solution: Add the label in each Gateway infrastructure field.
1 parent acf316c commit ee195fc

37 files changed

+100
-15
lines changed

tests/Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ GITHUB_OUTPUT =
99
GW_API_VERSION ?= $(shell sed -n 's/.*ref=v\(.*\)/\1/p' ../config/crd/gateway-api/standard/kustomization.yaml)## Supported Gateway API version from current NGF
1010
GW_API_PREV_VERSION ?= 1.2.1## Supported Gateway API version from previous NGF release
1111
GW_SERVICE_TYPE = NodePort## Service type to use for the gateway
12-
GW_SVC_GKE_INTERNAL = false
1312
NGF_VERSION ?= edge## NGF version to be tested
1413
PULL_POLICY = Never## Pull policy for the images
1514
NGINX_CONF_DIR = internal/mode/static/nginx/conf
@@ -127,9 +126,8 @@ stop-longevity-test: nfr-test ## Stop the longevity test and collects results
127126
--gateway-api-prev-version=$(GW_API_PREV_VERSION) --image-tag=$(TAG) --version-under-test=$(NGF_VERSION) \
128127
--ngf-image-repo=$(PREFIX) --nginx-image-repo=$(NGINX_PREFIX) --nginx-plus-image-repo=$(NGINX_PLUS_PREFIX) \
129128
--pull-policy=$(PULL_POLICY) --service-type=$(GW_SERVICE_TYPE) \
130-
--is-gke-internal-lb=$(GW_SVC_GKE_INTERNAL) --plus-enabled=$(PLUS_ENABLED) \
131-
--plus-license-file-name=$(PLUS_LICENSE_FILE) --plus-usage-endpoint=$(PLUS_USAGE_ENDPOINT) \
132-
--gke-project=$(GKE_PROJECT)
129+
--plus-enabled=$(PLUS_ENABLED) --plus-license-file-name=$(PLUS_LICENSE_FILE) \
130+
--plus-usage-endpoint=$(PLUS_USAGE_ENDPOINT) --gke-project=$(GKE_PROJECT)
133131

134132
.PHONY: test
135133
test: build-crossplane-image ## Runs the functional tests on your kind k8s cluster
@@ -141,7 +139,7 @@ test: build-crossplane-image ## Runs the functional tests on your kind k8s clust
141139
--image-tag=$(TAG) --version-under-test=$(NGF_VERSION) \
142140
--ngf-image-repo=$(PREFIX) --nginx-image-repo=$(NGINX_PREFIX) --nginx-plus-image-repo=$(NGINX_PLUS_PREFIX) \
143141
--pull-policy=$(PULL_POLICY) --service-type=$(GW_SERVICE_TYPE) \
144-
--is-gke-internal-lb=$(GW_SVC_GKE_INTERNAL) --cluster-name=$(CLUSTER_NAME) --plus-enabled=$(PLUS_ENABLED) \
142+
--cluster-name=$(CLUSTER_NAME) --plus-enabled=$(PLUS_ENABLED) \
145143
--plus-license-file-name=$(PLUS_LICENSE_FILE) --plus-usage-endpoint=$(PLUS_USAGE_ENDPOINT)
146144

147145
.PHONY: test-with-plus

tests/framework/ngf.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ type InstallationConfig struct {
3535
ServiceType string
3636
PlusUsageEndpoint string
3737
Plus bool
38-
IsGKEInternalLB bool
3938
Telemetry bool
4039
}
4140

@@ -231,11 +230,6 @@ func setImageArgs(cfg InstallationConfig) []string {
231230

232231
if cfg.ServiceType != "" {
233232
args = append(args, formatValueSet("nginx.service.type", cfg.ServiceType)...)
234-
if cfg.ServiceType == "LoadBalancer" && cfg.IsGKEInternalLB {
235-
args = append(
236-
args,
237-
formatValueSet(`service.annotations.networking\.gke\.io\/load-balancer-type`, "Internal")...)
238-
}
239233
}
240234

241235
return args

tests/scripts/remote-scripts/run-nfr-tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ elif [ "${STOP_LONGEVITY}" == "true" ]; then
1010
GINKGO_LABEL="longevity-teardown"
1111
fi
1212

13-
cd nginx-gateway-fabric/tests && make .vm-nfr-test CI=${CI} TAG="${TAG}" PREFIX="${PREFIX}" NGINX_PREFIX="${NGINX_PREFIX}" NGINX_PLUS_PREFIX="${NGINX_PLUS_PREFIX}" PLUS_ENABLED="${PLUS_ENABLED}" GINKGO_LABEL=${GINKGO_LABEL} GINKGO_FLAGS="${GINKGO_FLAGS}" PULL_POLICY=Always GW_SERVICE_TYPE=LoadBalancer GW_SVC_GKE_INTERNAL=true NGF_VERSION="${NGF_VERSION}" PLUS_USAGE_ENDPOINT="${PLUS_USAGE_ENDPOINT}" GKE_PROJECT="${GKE_PROJECT}"
13+
cd nginx-gateway-fabric/tests && make .vm-nfr-test CI=${CI} TAG="${TAG}" PREFIX="${PREFIX}" NGINX_PREFIX="${NGINX_PREFIX}" NGINX_PLUS_PREFIX="${NGINX_PLUS_PREFIX}" PLUS_ENABLED="${PLUS_ENABLED}" GINKGO_LABEL=${GINKGO_LABEL} GINKGO_FLAGS="${GINKGO_FLAGS}" PULL_POLICY=Always GW_SERVICE_TYPE=LoadBalancer NGF_VERSION="${NGF_VERSION}" PLUS_USAGE_ENDPOINT="${PLUS_USAGE_ENDPOINT}" GKE_PROJECT="${GKE_PROJECT}"
1414

1515
if [ "${START_LONGEVITY}" == "true" ]; then
1616
suite/scripts/longevity-wrk.sh

tests/suite/manifests/dp-perf/gateway.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ metadata:
44
name: cafe
55
spec:
66
gatewayClassName: nginx
7+
infrastructure:
8+
annotations:
9+
service.annotations.networking.gke.io/load-balancer-type: Internal
710
listeners:
811
- name: http
912
port: 80

tests/suite/manifests/longevity/gateway.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ metadata:
44
name: gateway
55
spec:
66
gatewayClassName: nginx
7+
infrastructure:
8+
annotations:
9+
service.annotations.networking.gke.io/load-balancer-type: Internal
710
listeners:
811
- name: http
912
port: 80

tests/suite/manifests/ngf-upgrade/gateway-updated.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ metadata:
44
name: gateway
55
spec:
66
gatewayClassName: nginx
7+
infrastructure:
8+
annotations:
9+
service.annotations.networking.gke.io/load-balancer-type: Internal
710
listeners:
811
- name: http
912
port: 80

tests/suite/manifests/ngf-upgrade/gateway.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ metadata:
44
name: gateway
55
spec:
66
gatewayClassName: nginx
7+
infrastructure:
8+
annotations:
9+
service.annotations.networking.gke.io/load-balancer-type: Internal
710
listeners:
811
- name: http
912
port: 80

tests/suite/manifests/reconfig/gateway.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ metadata:
44
name: gateway
55
spec:
66
gatewayClassName: nginx
7+
infrastructure:
8+
annotations:
9+
service.annotations.networking.gke.io/load-balancer-type: Internal
710
listeners:
811
- name: http
912
port: 80

tests/suite/manifests/scale/matches.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ metadata:
44
name: gateway
55
spec:
66
gatewayClassName: nginx
7+
infrastructure:
8+
annotations:
9+
service.annotations.networking.gke.io/load-balancer-type: Internal
710
listeners:
811
- name: listener
912
port: 80

tests/suite/manifests/scale/upstreams.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ metadata:
44
name: gateway
55
spec:
66
gatewayClassName: nginx
7+
infrastructure:
8+
annotations:
9+
service.annotations.networking.gke.io/load-balancer-type: Internal
710
listeners:
811
- name: listener
912
hostname: "*.example.com"

0 commit comments

Comments
 (0)