kube/traefik/application-extras.yml

109 lines
2.0 KiB
YAML
Raw Normal View History

2022-08-16 09:40:54 +00:00
---
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'
---
apiVersion: traefik.io/v1alpha1
kind: TLSStore
metadata:
name: default
spec:
defaultCertificate:
secretName: wildcard-tls
2022-08-16 09:40:54 +00:00
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: wildcard-tls
namespace: traefik
spec:
dnsNames:
- '*.k-space.ee'
issuerRef:
group: cert-manager.io
kind: ClusterIssuer
name: default
secretName: wildcard-tls
usages:
- digital signature
- key encipherment
---
apiVersion: traefik.io/v1alpha1
2022-08-16 09:40:54 +00:00
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.io/v1alpha1
2022-08-16 09:40:54 +00:00
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