File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff 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---
159165apiVersion : v1
Original file line number Diff line number Diff line change 3636)
3737
3838type NginxOptions struct {
39- Namespace string
40- Replicas * int32
39+ Namespace string
40+ Replicas * int32
41+ IngressVersion string
4142}
4243
4344func init () {
@@ -51,6 +52,7 @@ func init() {
5152func (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
Original file line number Diff line number Diff 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 = `
24492452apiVersion: gateway.networking.k8s.io/v1
You can’t perform that action at this time.
0 commit comments