Add UDP support in kubernetesCRD provider
Co-authored-by: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>
This commit is contained in:
parent
98f304f8b0
commit
665aeb34b2
40 changed files with 2041 additions and 366 deletions
|
@ -42,6 +42,21 @@ spec:
|
|||
singular: ingressroutetcp
|
||||
scope: Namespaced
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
name: ingressrouteudps.traefik.containo.us
|
||||
|
||||
spec:
|
||||
group: traefik.containo.us
|
||||
version: v1alpha1
|
||||
names:
|
||||
kind: IngressRouteUDP
|
||||
plural: ingressrouteudps
|
||||
singular: ingressrouteudp
|
||||
scope: Namespaced
|
||||
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1beta1
|
||||
kind: CustomResourceDefinition
|
||||
|
|
|
@ -82,3 +82,47 @@ spec:
|
|||
selector:
|
||||
app: containous
|
||||
task: whoamitcp
|
||||
|
||||
---
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: whoamiudp
|
||||
namespace: default
|
||||
labels:
|
||||
app: containous
|
||||
name: whoamiudp
|
||||
|
||||
spec:
|
||||
replicas: 2
|
||||
selector:
|
||||
matchLabels:
|
||||
app: containous
|
||||
task: whoamiudp
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: containous
|
||||
task: whoamiudp
|
||||
spec:
|
||||
containers:
|
||||
- name: containouswhoamiudp
|
||||
image: containous/whoamiudp:dev
|
||||
ports:
|
||||
- containerPort: 8090
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: whoamiudp
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
ports:
|
||||
- protocol: UDP
|
||||
name: fooudp
|
||||
port: 8090
|
||||
selector:
|
||||
app: containous
|
||||
task: whoamiudp
|
||||
|
|
14
integration/fixtures/k8s/05-ingressrouteudp.yml
Normal file
14
integration/fixtures/k8s/05-ingressrouteudp.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRouteUDP
|
||||
metadata:
|
||||
name: test3.route
|
||||
namespace: default
|
||||
|
||||
spec:
|
||||
entryPoints:
|
||||
- fooudp
|
||||
routes:
|
||||
- services:
|
||||
- name: whoamiudp
|
||||
namespace: default
|
||||
port: 8090
|
|
@ -10,6 +10,8 @@
|
|||
[entryPoints]
|
||||
[entryPoints.footcp]
|
||||
address = ":8093"
|
||||
[entryPoints.fooudp]
|
||||
address = ":8090/udp"
|
||||
[entryPoints.web]
|
||||
address = ":8000"
|
||||
|
||||
|
|
30
integration/testdata/rawdata-crd.json
vendored
30
integration/testdata/rawdata-crd.json
vendored
|
@ -208,5 +208,35 @@
|
|||
"default-test3.route-673acf455cb2dab0b43a@kubernetescrd"
|
||||
]
|
||||
}
|
||||
},
|
||||
"udpRouters": {
|
||||
"default-test3.route-0@kubernetescrd": {
|
||||
"entryPoints": [
|
||||
"fooudp"
|
||||
],
|
||||
"service": "default-test3.route-0",
|
||||
"status": "enabled",
|
||||
"using": [
|
||||
"fooudp"
|
||||
]
|
||||
}
|
||||
},
|
||||
"udpServices": {
|
||||
"default-test3.route-0@kubernetescrd": {
|
||||
"loadBalancer": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "10.42.0.4:8090"
|
||||
},
|
||||
{
|
||||
"address": "10.42.0.6:8090"
|
||||
}
|
||||
]
|
||||
},
|
||||
"status": "enabled",
|
||||
"usedBy": [
|
||||
"default-test3.route-0@kubernetescrd"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue