kube/traefik/application-extras.yml

134 lines
2.7 KiB
YAML
Raw Normal View History

2022-08-16 09:40:54 +00:00
---
apiVersion: v1
kind: Service
metadata:
name: traefik-dashboard
namespace: traefik
spec:
selector:
2023-07-28 09:21:50 +00:00
app.kubernetes.io/instance: k6-traefik
2022-08-16 09:40:54 +00:00
app.kubernetes.io/name: traefik
ports:
- protocol: TCP
port: 9000
targetPort: 9000
---
apiVersion: v1
kind: Service
metadata:
name: traefik-metrics
namespace: traefik
spec:
selector:
2023-07-28 09:21:50 +00:00
app.kubernetes.io/instance: k6-traefik
2022-08-16 09:40:54 +00:00
app.kubernetes.io/name: traefik
ports:
- protocol: TCP
port: 9100
targetPort: 9100
---
2023-07-28 09:21:50 +00:00
apiVersion: codemowers.io/v1alpha1
kind: OIDCGWMiddlewareClient
metadata:
name: dashboard
spec:
displayName: Traefik dashboard
uri: 'https://traefik.k-space.ee'
---
2022-08-16 09:40:54 +00:00
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: traefik-dashboard
namespace: traefik
annotations:
kubernetes.io/ingress.class: traefik
# Keep IP address in sync with values.yaml
external-dns.alpha.kubernetes.io/target: 193.40.103.36
traefik.ingress.kubernetes.io/router.entrypoints: websecure
2023-07-28 09:21:50 +00:00
traefik.ingress.kubernetes.io/router.middlewares: traefik-dashboard@kubernetescrd,traefik-dashboard-redirect@kubernetescrd
2022-08-16 09:40:54 +00:00
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
rules:
- host: traefik.k-space.ee
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: traefik-dashboard
port:
number: 9000
tls:
2023-07-28 09:21:50 +00:00
- hosts:
- "*.k-space.ee"
---
apiVersion: traefik.containo.us/v1alpha1
kind: TLSStore
metadata:
name: default
spec:
defaultCertificate:
secretName: wildcard-tls
2022-08-16 09:40:54 +00:00
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: dashboard-redirect
spec:
redirectRegex:
regex: ^https://traefik.k-space.ee/?$
replacement: https://traefik.k-space.ee/dashboard/
permanent: false
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: traefik
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: traefik
policyTypes:
- Ingress
- Egress
ingress:
2022-09-11 13:24:35 +00:00
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: prometheus-operator
podSelector:
matchLabels:
app.kubernetes.io/name: prometheus
ports:
- protocol: TCP
port: 9100
2022-08-16 09:40:54 +00:00
- from:
- ipBlock:
cidr: 0.0.0.0/0
- ports:
- port: 80
- port: 443
egress:
- {}
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: block-metrics
spec:
replacePathRegex:
regex: ^/metrics
replacement: /
2022-09-11 13:24:35 +00:00
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: traefik
spec:
selector:
matchLabels:
app.kubernetes.io/name: traefik
podMetricsEndpoints:
- port: metrics