Tanguy Herbron
1830d126a5
Add ServiceMonitor resource to scrape /metrics endpoint. Said endpoint cannot be scrapped from outside of the cluster, as a special IngressRoute Middleware prevents the exposition of said endpoint.
30 lines
570 B
YAML
30 lines
570 B
YAML
apiVersion: traefik.containo.us/v1alpha1
|
|
kind: Middleware
|
|
metadata:
|
|
name: replace-regex
|
|
namespace: gitea
|
|
spec:
|
|
replacePathRegex:
|
|
regex: "^/metrics"
|
|
replacement: "/"
|
|
|
|
---
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: gitea-ingress
|
|
namespace: gitea
|
|
annotations:
|
|
kubernetes.io/ingress.class: "traefik"
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- match: Host(`git.beta.halia.dev`) && PathPrefix(`/`)
|
|
kind: Rule
|
|
middlewares:
|
|
- name: replace-regex
|
|
services:
|
|
- name: gitea-svc
|
|
port: 80
|