feat(traefik): Move to independant namespace and rework general settings

This commit is contained in:
Tanguy Herbron 2024-01-14 01:14:24 +01:00
parent 7cf774d82d
commit e537d10bdb
8 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,20 @@
---
# Source: traefik/templates/dashboard-hook-ingressroute.yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
annotations:
helm.sh/hook: "post-install,post-upgrade"
labels:
app.kubernetes.io/name: traefik
app.kubernetes.io/instance: traefik
spec:
entryPoints:
- traefik
routes:
- match: PathPrefix(`/dashboard`) || PathPrefix(`/api`)
kind: Rule
services:
- name: api@internal
kind: TraefikService

View File

@ -0,0 +1,22 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: traefik-dashboard-ingress
annotations:
kubernetes.io/ingress.class: "traefik-inter"
spec:
tls:
- secretName: traefik-dashboard-beta-tls
hosts:
- traefik.beta.entos
rules:
- host: traefik.beta.entos
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: traefik-dashboard-svc
port:
number: 80

View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: traefik-dashboard-svc
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
selector:
app.kubernetes.io/name: traefik-inter
app.kubernetes.io/instance: treafik-inter

16
traefik/dashboard.yaml Normal file
View File

@ -0,0 +1,16 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: traefik-dashboard
namespace: traefik
annotations:
kubernetes.io/ingress.class: "traefik-inter"
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`traefik.beta.entos`)
services:
- name: api@internal
kind: TraefikService

4
traefik/namespace.yaml Normal file
View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: traefik

View File

@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: traefik-dashboard-svc
namespace: default
spec:
ports:
- name: admin
port: 8080
protocol: TCP
targetPort: 8080
selector:
app.kubernetes.io/name: traefik
app.kubernetes.io/instance: traefik

View File