Make the prom/graf stack great again
This commit is contained in:
parent
413a8c1a4d
commit
1730b7f67b
@ -1,10 +1,12 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
run: blackbox-exporter
|
||||
name: blackbox-exporter
|
||||
namespace: monitoring
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
run: blackbox-exporter
|
||||
@ -28,12 +30,14 @@ spec:
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
run: grafana
|
||||
name: grafana
|
||||
namespace: monitoring
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
run: grafana
|
||||
@ -82,12 +86,14 @@ spec:
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
run: prometheus
|
||||
name: prometheus
|
||||
namespace: monitoring
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
run: prometheus
|
||||
@ -108,10 +114,16 @@ spec:
|
||||
- mountPath: /etc/prometheus
|
||||
readOnly: true
|
||||
name: prometheus
|
||||
- mountPath: /prometheus/data
|
||||
readOnly: false
|
||||
name: prometheus-data
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: prometheus
|
||||
persistentVolumeClaim:
|
||||
claimName: prometheus
|
||||
- name: prometheus-data
|
||||
persistentVolumeClaim:
|
||||
claimName: prometheus-data
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@ apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: grafana-ingr
|
||||
namespace: monitoring
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
|
@ -4,6 +4,7 @@ metadata:
|
||||
labels:
|
||||
run: grafana
|
||||
name: grafana
|
||||
namespace: monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: "grafweb"
|
||||
@ -19,6 +20,7 @@ metadata:
|
||||
labels:
|
||||
run: prometheus
|
||||
name: prometheus
|
||||
namespace: monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: "prom"
|
||||
@ -26,6 +28,7 @@ spec:
|
||||
targetPort: 9090
|
||||
selector:
|
||||
run: prometheus
|
||||
type: LoadBalancer
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
@ -34,6 +37,7 @@ metadata:
|
||||
labels:
|
||||
run: blackbox-exporter
|
||||
name: blackbox-exporter
|
||||
namespace: monitoring
|
||||
spec:
|
||||
ports:
|
||||
- name: "bbox"
|
||||
|
@ -3,6 +3,7 @@ apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: blackbox-exporter
|
||||
namespace: monitoring
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
@ -17,6 +18,7 @@ apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana-data
|
||||
namespace: monitoring
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
@ -31,6 +33,7 @@ apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana-conf
|
||||
namespace: monitoring
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
@ -45,6 +48,7 @@ apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: prometheus
|
||||
namespace: monitoring
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
@ -54,3 +58,18 @@ spec:
|
||||
storage: 10Gi
|
||||
volumeName: prometheus
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: prometheus-data
|
||||
namespace: monitoring
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: ""
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
volumeName: prometheus-data
|
||||
|
||||
|
@ -3,6 +3,7 @@ apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: blackbox-exporter
|
||||
namespace: monitoring
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
@ -19,6 +20,7 @@ apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: grafana-data
|
||||
namespace: monitoring
|
||||
spec:
|
||||
capacity:
|
||||
storage: 50Gi
|
||||
@ -35,6 +37,7 @@ apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: grafana-conf
|
||||
namespace: monitoring
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
@ -51,6 +54,7 @@ apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: prometheus
|
||||
namespace: monitoring
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
@ -62,3 +66,20 @@ spec:
|
||||
mountOptions:
|
||||
- nfsvers=4.2
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: prometheus-data
|
||||
namespace: monitoring
|
||||
spec:
|
||||
capacity:
|
||||
storage: 30Gi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
nfs:
|
||||
server: nas.sq.lan
|
||||
path: "/swarmdata/grafana/prometheus-data"
|
||||
mountOptions:
|
||||
- nfsvers=4.2
|
||||
|
||||
|
4
grafana/monitoring-ns.yaml
Normal file
4
grafana/monitoring-ns.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: monitoring
|
Loading…
x
Reference in New Issue
Block a user