ip/kustomize/ingressroute.yml
Julien Cabillot 13193d699e
All checks were successful
Web/ip/pipeline/head This commit looks good
web/ip/pipeline/head This commit looks good
test de ingressroute
2021-08-06 21:51:24 -04:00

51 lines
1.0 KiB
YAML

---
# TODO: Named port for service
# but currently unsupported on my k3s cluster https://github.com/traefik/traefik/pull/7668
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: "ip-websecure"
spec:
entryPoints:
- "websecure"
routes:
- kind: Rule
match: Host(`ip.opti.cabillot.eu`)
middlewares: []
priority: 10
services:
- kind: Service
name: "ip"
port: 80
tls:
secretName: "ipcabilloteu-tls"
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: "ip-web"
spec:
entryPoints:
- "web"
routes:
- match: Host(`ip.opti.cabillot.eu`)
kind: Rule
priority: 10
services:
# in this IngressRoute the service will be never called
# because of the redirect middleware BUT DO NOT REMOVE !
- kind: Service
name: "ip"
port: 80
middlewares:
- name: "httpsredirect"
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: "httpsredirect"
spec:
redirectScheme:
scheme: https
permanent: true