forked from k-space/kube
Migrate to Prometheus Operator
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
@@ -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
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user