Migrate to Prometheus Operator

This commit is contained in:
2022-09-11 16:24:35 +03:00
parent ee4b1ddf57
commit 1045ed2f26
30 changed files with 32403 additions and 129 deletions

View File

@@ -1,6 +1,7 @@
Traefik Ingress Controller:
```
kubectl create namespace traefik
helm template --include-crds -n traefik --release-name k6 traefik/traefik -f values.yml > application.yml
kubectl apply -n traefik -f namespace.yml -f application.yml -f application-extras.yml -f whoami.yml -f proxmox.yml -f voron.yml
kubectl apply -n traefik -f application.yml -f application-extras.yml -f whoami.yml -f proxmox.yml -f voron.yml
```

View File

@@ -28,9 +28,6 @@ kind: Service
metadata:
name: traefik-metrics
namespace: traefik
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '9100'
spec:
selector:
app.kubernetes.io/name: traefik
@@ -92,6 +89,16 @@ spec:
- Ingress
- Egress
ingress:
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: prometheus-operator
podSelector:
matchLabels:
app.kubernetes.io/name: prometheus
ports:
- protocol: TCP
port: 9100
- from:
- ipBlock:
cidr: 0.0.0.0/0
@@ -109,3 +116,14 @@ spec:
replacePathRegex:
regex: ^/metrics
replacement: /
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: traefik
spec:
selector:
matchLabels:
app.kubernetes.io/name: traefik
podMetricsEndpoints:
- port: metrics

View File

@@ -17,9 +17,8 @@ deployment:
keel.sh/trigger: patch
keel.sh/pollSchedule: "@midnight"
podAnnotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '9100'
accessLog:
format: json
# Globally redirect to https://
globalArguments: