Make the prom/graf stack great again
This commit is contained in:
parent
413a8c1a4d
commit
1730b7f67b
@ -1,10 +1,12 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
run: blackbox-exporter
|
run: blackbox-exporter
|
||||||
name: blackbox-exporter
|
name: blackbox-exporter
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
run: blackbox-exporter
|
run: blackbox-exporter
|
||||||
@ -28,12 +30,14 @@ spec:
|
|||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
run: grafana
|
run: grafana
|
||||||
name: grafana
|
name: grafana
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
run: grafana
|
run: grafana
|
||||||
@ -82,12 +86,14 @@ spec:
|
|||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
run: prometheus
|
run: prometheus
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
run: prometheus
|
run: prometheus
|
||||||
@ -108,10 +114,16 @@ spec:
|
|||||||
- mountPath: /etc/prometheus
|
- mountPath: /etc/prometheus
|
||||||
readOnly: true
|
readOnly: true
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
- mountPath: /prometheus/data
|
||||||
|
readOnly: false
|
||||||
|
name: prometheus-data
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
volumes:
|
volumes:
|
||||||
- name: prometheus
|
- name: prometheus
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: prometheus
|
claimName: prometheus
|
||||||
|
- name: prometheus-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: prometheus-data
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ apiVersion: networking.k8s.io/v1
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-ingr
|
name: grafana-ingr
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
|
@ -4,6 +4,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
run: grafana
|
run: grafana
|
||||||
name: grafana
|
name: grafana
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: "grafweb"
|
- name: "grafweb"
|
||||||
@ -19,6 +20,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
run: prometheus
|
run: prometheus
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: "prom"
|
- name: "prom"
|
||||||
@ -26,6 +28,7 @@ spec:
|
|||||||
targetPort: 9090
|
targetPort: 9090
|
||||||
selector:
|
selector:
|
||||||
run: prometheus
|
run: prometheus
|
||||||
|
type: LoadBalancer
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
@ -34,6 +37,7 @@ metadata:
|
|||||||
labels:
|
labels:
|
||||||
run: blackbox-exporter
|
run: blackbox-exporter
|
||||||
name: blackbox-exporter
|
name: blackbox-exporter
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: "bbox"
|
- name: "bbox"
|
||||||
|
@ -3,6 +3,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: blackbox-exporter
|
name: blackbox-exporter
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
@ -17,6 +18,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-data
|
name: grafana-data
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
@ -31,6 +33,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-conf
|
name: grafana-conf
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
@ -45,6 +48,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteMany
|
- ReadWriteMany
|
||||||
@ -54,3 +58,18 @@ spec:
|
|||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
volumeName: prometheus
|
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
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: blackbox-exporter
|
name: blackbox-exporter
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
@ -19,6 +20,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-data
|
name: grafana-data
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 50Gi
|
storage: 50Gi
|
||||||
@ -35,6 +37,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana-conf
|
name: grafana-conf
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
@ -51,6 +54,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolume
|
kind: PersistentVolume
|
||||||
metadata:
|
metadata:
|
||||||
name: prometheus
|
name: prometheus
|
||||||
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
capacity:
|
capacity:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
@ -62,3 +66,20 @@ spec:
|
|||||||
mountOptions:
|
mountOptions:
|
||||||
- nfsvers=4.2
|
- 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