-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add automated tests for custom vs listeners (#4311)
* Add automated tests for custom vs listeners Signed-off-by: Haywood Shannon <[email protected]>
- Loading branch information
Showing
18 changed files
with
653 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/data/virtual-server-custom-listeners/global-configuration-http-listener-with-ssl.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: k8s.nginx.org/v1alpha1 | ||
kind: GlobalConfiguration | ||
metadata: | ||
name: nginx-configuration | ||
namespace: nginx-ingress | ||
spec: | ||
listeners: | ||
- name: dns-udp | ||
port: 5353 | ||
protocol: UDP | ||
- name: dns-tcp | ||
port: 5353 | ||
protocol: TCP | ||
- name: http-8085 | ||
port: 8085 | ||
protocol: HTTP | ||
ssl: true | ||
- name: https-8445 | ||
port: 8445 | ||
protocol: HTTP | ||
ssl: true |
19 changes: 19 additions & 0 deletions
19
...data/virtual-server-custom-listeners/global-configuration-https-listener-without-ssl.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: k8s.nginx.org/v1alpha1 | ||
kind: GlobalConfiguration | ||
metadata: | ||
name: nginx-configuration | ||
namespace: nginx-ingress | ||
spec: | ||
listeners: | ||
- name: dns-udp | ||
port: 5353 | ||
protocol: UDP | ||
- name: dns-tcp | ||
port: 5353 | ||
protocol: TCP | ||
- name: http-8085 | ||
port: 8085 | ||
protocol: HTTP | ||
- name: https-8445 | ||
port: 8445 | ||
protocol: HTTP |
13 changes: 13 additions & 0 deletions
13
tests/data/virtual-server-custom-listeners/global-configuration-missing-http-https.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: k8s.nginx.org/v1alpha1 | ||
kind: GlobalConfiguration | ||
metadata: | ||
name: nginx-configuration | ||
namespace: nginx-ingress | ||
spec: | ||
listeners: | ||
- name: dns-udp | ||
port: 5353 | ||
protocol: UDP | ||
- name: dns-tcp | ||
port: 5353 | ||
protocol: TCP |
17 changes: 17 additions & 0 deletions
17
tests/data/virtual-server-custom-listeners/global-configuration-missing-http.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
apiVersion: k8s.nginx.org/v1alpha1 | ||
kind: GlobalConfiguration | ||
metadata: | ||
name: nginx-configuration | ||
namespace: nginx-ingress | ||
spec: | ||
listeners: | ||
- name: dns-udp | ||
port: 5353 | ||
protocol: UDP | ||
- name: dns-tcp | ||
port: 5353 | ||
protocol: TCP | ||
- name: https-8445 | ||
port: 8445 | ||
protocol: HTTP | ||
ssl: true |
16 changes: 16 additions & 0 deletions
16
tests/data/virtual-server-custom-listeners/global-configuration-missing-https.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: k8s.nginx.org/v1alpha1 | ||
kind: GlobalConfiguration | ||
metadata: | ||
name: nginx-configuration | ||
namespace: nginx-ingress | ||
spec: | ||
listeners: | ||
- name: dns-udp | ||
port: 5353 | ||
protocol: UDP | ||
- name: dns-tcp | ||
port: 5353 | ||
protocol: TCP | ||
- name: http-8085 | ||
port: 8085 | ||
protocol: HTTP |
20 changes: 20 additions & 0 deletions
20
tests/data/virtual-server-custom-listeners/global-configuration.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
apiVersion: k8s.nginx.org/v1alpha1 | ||
kind: GlobalConfiguration | ||
metadata: | ||
name: nginx-configuration | ||
namespace: nginx-ingress | ||
spec: | ||
listeners: | ||
- name: dns-udp | ||
port: 5353 | ||
protocol: UDP | ||
- name: dns-tcp | ||
port: 5353 | ||
protocol: TCP | ||
- name: http-8085 | ||
port: 8085 | ||
protocol: HTTP | ||
- name: https-8445 | ||
port: 8445 | ||
protocol: HTTP | ||
ssl: true |
22 changes: 22 additions & 0 deletions
22
tests/data/virtual-server-custom-listeners/standard/virtual-server.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: virtual-server-status | ||
spec: | ||
host: virtual-server-status.example.com | ||
tls: | ||
secret: virtual-server-tls-secret | ||
upstreams: | ||
- name: backend2 | ||
service: backend2-svc | ||
port: 80 | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
routes: | ||
- path: /backend1 | ||
action: | ||
pass: backend1 | ||
- path: /backend2 | ||
action: | ||
pass: backend2 |
25 changes: 25 additions & 0 deletions
25
tests/data/virtual-server-custom-listeners/virtual-server-http-https-listeners-switched.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: virtual-server-status | ||
spec: | ||
listener: | ||
http: https-8445 | ||
https: http-8085 | ||
host: virtual-server-status.example.com | ||
tls: | ||
secret: virtual-server-tls-secret | ||
upstreams: | ||
- name: backend2 | ||
service: backend2-svc | ||
port: 80 | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
routes: | ||
- path: /backend1 | ||
action: | ||
pass: backend1 | ||
- path: /backend2 | ||
action: | ||
pass: backend2 |
25 changes: 25 additions & 0 deletions
25
tests/data/virtual-server-custom-listeners/virtual-server-http-listener-in-https-block.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: virtual-server-status | ||
spec: | ||
listener: | ||
http: "" | ||
https: http-8085 | ||
host: virtual-server-status.example.com | ||
tls: | ||
secret: virtual-server-tls-secret | ||
upstreams: | ||
- name: backend2 | ||
service: backend2-svc | ||
port: 80 | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
routes: | ||
- path: /backend1 | ||
action: | ||
pass: backend1 | ||
- path: /backend2 | ||
action: | ||
pass: backend2 |
25 changes: 25 additions & 0 deletions
25
tests/data/virtual-server-custom-listeners/virtual-server-https-listener-in-http-block.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: virtual-server-status | ||
spec: | ||
listener: | ||
http: https-8445 | ||
https: "" | ||
host: virtual-server-status.example.com | ||
tls: | ||
secret: virtual-server-tls-secret | ||
upstreams: | ||
- name: backend2 | ||
service: backend2-svc | ||
port: 80 | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
routes: | ||
- path: /backend1 | ||
action: | ||
pass: backend1 | ||
- path: /backend2 | ||
action: | ||
pass: backend2 |
25 changes: 25 additions & 0 deletions
25
tests/data/virtual-server-custom-listeners/virtual-server.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: virtual-server-status | ||
spec: | ||
listener: | ||
http: http-8085 | ||
https: https-8445 | ||
host: virtual-server-status.example.com | ||
tls: | ||
secret: virtual-server-tls-secret | ||
upstreams: | ||
- name: backend2 | ||
service: backend2-svc | ||
port: 80 | ||
- name: backend1 | ||
service: backend1-svc | ||
port: 80 | ||
routes: | ||
- path: /backend1 | ||
action: | ||
pass: backend1 | ||
- path: /backend2 | ||
action: | ||
pass: backend2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.