Skip to content

Commit 9cbefc0

Browse files
committed
fix: k8s 1.18
Signed-off-by: Ashing Zheng <[email protected]>
1 parent a6b47f3 commit 9cbefc0

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

test/e2e/framework/manifests/nginx.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,23 @@ spec:
143143
port: 443
144144
protocol: TCP
145145
targetPort: 443
146+
{{ if eq .IngressVersion "v1" -}}
146147
appProtocol: https
148+
{{ end -}}
147149
- name: ws
148150
port: 8080
149151
protocol: TCP
150152
targetPort: 80
153+
{{ if eq .IngressVersion "v1" -}}
151154
appProtocol: kubernetes.io/ws
155+
{{ end -}}
152156
- name: wss
153157
port: 8443
154158
protocol: TCP
155159
targetPort: 443
160+
{{ if eq .IngressVersion "v1" -}}
156161
appProtocol: kubernetes.io/wss
162+
{{ end -}}
157163
type: ClusterIP
158164
---
159165
apiVersion: v1

test/e2e/framework/nginx.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ var (
3636
)
3737

3838
type NginxOptions struct {
39-
Namespace string
40-
Replicas *int32
39+
Namespace string
40+
Replicas *int32
41+
IngressVersion string
4142
}
4243

4344
func init() {
@@ -51,6 +52,7 @@ func init() {
5152
func (f *Framework) DeployNginx(opts NginxOptions) *corev1.Service {
5253
buf := bytes.NewBuffer(nil)
5354

55+
opts.IngressVersion = IngressVersion
5456
err := ngxSpecTpl.Execute(buf, opts)
5557
f.GomegaT.Expect(err).ToNot(HaveOccurred(), "rendering nginx spec")
5658

test/e2e/gatewayapi/httproute.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2444,6 +2444,9 @@ spec:
24442444
})
24452445

24462446
Context("Test Service With AppProtocol", func() {
2447+
if framework.IngressVersion != "v1" {
2448+
Skip("skipping test in non-v1 ingress version")
2449+
}
24472450
var (
24482451
httproute = `
24492452
apiVersion: gateway.networking.k8s.io/v1

0 commit comments

Comments
 (0)