gatewayapi: adding support for TCPRoute and TLSRoute
Co-authored-by: Jean-Baptiste Doumenjou <925513+jbdoumenjou@users.noreply.github.com>
This commit is contained in:
parent
e1e1fd640c
commit
56f845c71a
72 changed files with 6241 additions and 208 deletions
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: unkown.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
tls:
|
||||
certificateRef:
|
||||
kind: Secret
|
||||
name: supersecret
|
||||
group: core
|
||||
port: 8080
|
||||
routes:
|
||||
kind: TCPRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: foo
|
||||
|
||||
---
|
||||
kind: TCPRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: foo
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 80
|
||||
weight: 1
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
namespace: default
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-tls-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
hostname: foo.example.com
|
||||
port: 9000
|
||||
tls:
|
||||
certificateRef:
|
||||
kind: Secret
|
||||
name: supersecret
|
||||
group: core
|
||||
routes:
|
||||
kind: TCPRoute
|
||||
selector:
|
||||
matchLabels:
|
||||
app: whoamitcp
|
||||
|
||||
---
|
||||
kind: TCPRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tcp-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: whoamitcp
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
namespace: default
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-tls-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
hostname: foo.example.com
|
||||
port: 9000
|
||||
tls:
|
||||
certificateRef:
|
||||
kind: Secret
|
||||
name: supersecret
|
||||
group: core
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
selector:
|
||||
matchLabels:
|
||||
app: whoamitls
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: whoamitls
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
namespace: default
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-tls-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
hostname: foo.example.com
|
||||
port: 9000
|
||||
tls:
|
||||
mode: Passthrough
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
selector:
|
||||
matchLabels:
|
||||
app: whoamitcp
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: whoamitcp
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,63 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 9000
|
||||
tls:
|
||||
certificateRef:
|
||||
kind: Secret
|
||||
name: supersecret
|
||||
group: core
|
||||
routes:
|
||||
kind: TCPRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tcp-app
|
||||
|
||||
---
|
||||
kind: TCPRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tcp-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tcp-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- weight: 1
|
||||
backendRef:
|
||||
group: traefik.containo.us
|
||||
kind: TraefikService
|
||||
name: service@file
|
||||
port: 9000
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,48 @@
|
|||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 9001
|
||||
hostname: foo.example.com
|
||||
tls:
|
||||
mode: Passthrough
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tls-app
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tls-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
||||
matches:
|
||||
- snis:
|
||||
- foo.bar
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 9001
|
||||
hostname: foo.example.com
|
||||
tls:
|
||||
mode: Passthrough
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tls-app
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tls-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
||||
matches:
|
||||
- snis:
|
||||
- foo.bar
|
||||
- "*"
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 9001
|
||||
hostname: foo.example.com
|
||||
tls:
|
||||
mode: Passthrough
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tls-app
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tls-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
||||
matches:
|
||||
- snis:
|
||||
- foo.bar
|
||||
- fiz.baz
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
namespace: default
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-tls-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
hostname: foo.example.com
|
||||
port: 9000
|
||||
tls:
|
||||
certificateRef:
|
||||
kind: Secret
|
||||
name: supersecret
|
||||
group: core
|
||||
routes:
|
||||
kind: TCPRoute
|
||||
selector:
|
||||
matchLabels:
|
||||
app: label-tcp-app-1
|
||||
- protocol: TLS
|
||||
port: 10000
|
||||
tls:
|
||||
mode: Passthrough
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
selector:
|
||||
matchLabels:
|
||||
app: label-tls-app-1
|
||||
|
||||
|
||||
---
|
||||
kind: TCPRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tcp-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: label-tcp-app-1
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: label-tls-app-1
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 10000
|
||||
weight: 1
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 9001
|
||||
hostname: foo.example.com
|
||||
tls:
|
||||
mode: Passthrough
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tls-app
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tls-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,60 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 9001
|
||||
hostname: foo.example.com
|
||||
tls:
|
||||
mode: Passthrough
|
||||
# certificateRef is ignored with mode "Passthrough"
|
||||
certificateRef:
|
||||
kind: Secret
|
||||
name: supersecret
|
||||
group: core
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tls-app
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tls-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: HTTP
|
||||
port: 9001
|
||||
hostname: foo.example.com
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tls-app
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tls-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,59 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: HTTPS
|
||||
port: 9001
|
||||
hostname: foo.example.com
|
||||
tls:
|
||||
mode: Terminate # Default mode
|
||||
certificateRef:
|
||||
kind: Secret
|
||||
name: supersecret
|
||||
group: core
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tls-app
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tls-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TCP
|
||||
port: 9001
|
||||
hostname: foo.example.com
|
||||
routes:
|
||||
kind: TLSRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: tls-app
|
||||
|
||||
---
|
||||
kind: TLSRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tls-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: tls-app
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 9000
|
||||
weight: 1
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: supersecret
|
||||
namespace: default
|
||||
|
||||
data:
|
||||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCi0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
|
||||
tls.key: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCi0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0=
|
||||
|
||||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 8080
|
||||
tls:
|
||||
certificateRef:
|
||||
kind: Secret
|
||||
name: supersecret
|
||||
group: core
|
||||
routes:
|
||||
kind: TCPRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: foo
|
||||
|
||||
---
|
||||
kind: TCPRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tcp-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: foo
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
weight: 1
|
||||
port: 9001
|
|
@ -0,0 +1,33 @@
|
|||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 8080
|
||||
routes:
|
||||
kind: TCPRoute
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: foo
|
||||
|
||||
---
|
||||
kind: TCPRoute
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: tcp-app-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: foo
|
||||
spec:
|
||||
rules:
|
||||
- forwardTo:
|
||||
- serviceName: whoamitcp
|
||||
port: 8080
|
||||
weight: 1
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
kind: GatewayClass
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway-class
|
||||
spec:
|
||||
controller: traefik.io/gateway-controller
|
||||
|
||||
---
|
||||
kind: Gateway
|
||||
apiVersion: networking.x-k8s.io/v1alpha1
|
||||
metadata:
|
||||
name: my-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
gatewayClassName: my-gateway-class
|
||||
listeners: # Use GatewayClass defaults for listener definition.
|
||||
- protocol: TLS
|
||||
port: 8080
|
||||
tls:
|
||||
mode: Passthrough
|
||||
routes:
|
||||
kind: TLSRoutes
|
||||
namespaces:
|
||||
from: Same
|
||||
selector:
|
||||
matchLabels:
|
||||
app: foo
|
Loading…
Add table
Add a link
Reference in a new issue