forked from k-space/kube
monitoring: Move to topologySpreadConstraints
This commit is contained in:
parent
3280b25a83
commit
f1a2051838
@ -31,6 +31,14 @@ kind: Alertmanager
|
|||||||
metadata:
|
metadata:
|
||||||
name: alertmanager
|
name: alertmanager
|
||||||
spec:
|
spec:
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: topology.kubernetes.io/zone
|
||||||
|
whenUnsatisfiable: DoNotSchedule
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: alertmanager
|
||||||
|
app.kubernetes.io/name: alertmanager
|
||||||
alertmanagerConfigMatcherStrategy:
|
alertmanagerConfigMatcherStrategy:
|
||||||
type: None
|
type: None
|
||||||
alertmanagerConfigNamespaceSelector: {}
|
alertmanagerConfigNamespaceSelector: {}
|
||||||
|
@ -188,16 +188,13 @@ spec:
|
|||||||
operator: Equal
|
operator: Equal
|
||||||
value: monitoring
|
value: monitoring
|
||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
affinity:
|
topologySpreadConstraints:
|
||||||
podAntiAffinity:
|
- maxSkew: 1
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
topologyKey: topology.kubernetes.io/zone
|
||||||
- labelSelector:
|
whenUnsatisfiable: DoNotSchedule
|
||||||
matchExpressions:
|
labelSelector:
|
||||||
- key: app
|
matchLabels:
|
||||||
operator: In
|
app: blackbox-exporter
|
||||||
values:
|
|
||||||
- blackbox-exporter
|
|
||||||
topologyKey: "kubernetes.io/hostname"
|
|
||||||
---
|
---
|
||||||
kind: Service
|
kind: Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -77,6 +77,13 @@ spec:
|
|||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: mikrotik-exporter
|
name: mikrotik-exporter
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: topology.kubernetes.io/zone
|
||||||
|
whenUnsatisfiable: DoNotSchedule
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app: mikrotik-exporter
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
dedicated: monitoring
|
dedicated: monitoring
|
||||||
tolerations:
|
tolerations:
|
||||||
|
@ -45,16 +45,13 @@ spec:
|
|||||||
operator: Equal
|
operator: Equal
|
||||||
value: monitoring
|
value: monitoring
|
||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
affinity:
|
topologySpreadConstraints:
|
||||||
podAntiAffinity:
|
- maxSkew: 1
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
topologyKey: topology.kubernetes.io/zone
|
||||||
- labelSelector:
|
whenUnsatisfiable: DoNotSchedule
|
||||||
matchExpressions:
|
labelSelector:
|
||||||
- key: app
|
matchLabels:
|
||||||
operator: In
|
app: ping-exporter
|
||||||
values:
|
|
||||||
- ping-exporter
|
|
||||||
topologyKey: "kubernetes.io/hostname"
|
|
||||||
---
|
---
|
||||||
kind: Service
|
kind: Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
@ -15,6 +15,14 @@ kind: Prometheus
|
|||||||
metadata:
|
metadata:
|
||||||
name: prometheus
|
name: prometheus
|
||||||
spec:
|
spec:
|
||||||
|
topologySpreadConstraints:
|
||||||
|
- maxSkew: 1
|
||||||
|
topologyKey: topology.kubernetes.io/zone
|
||||||
|
whenUnsatisfiable: DoNotSchedule
|
||||||
|
labelSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: prometheus
|
||||||
|
app.kubernetes.io/name: prometheus
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
dedicated: monitoring
|
dedicated: monitoring
|
||||||
tolerations:
|
tolerations:
|
||||||
|
@ -45,16 +45,13 @@ spec:
|
|||||||
operator: Equal
|
operator: Equal
|
||||||
value: monitoring
|
value: monitoring
|
||||||
effect: NoSchedule
|
effect: NoSchedule
|
||||||
affinity:
|
topologySpreadConstraints:
|
||||||
podAntiAffinity:
|
- maxSkew: 1
|
||||||
requiredDuringSchedulingIgnoredDuringExecution:
|
topologyKey: topology.kubernetes.io/zone
|
||||||
- labelSelector:
|
whenUnsatisfiable: DoNotSchedule
|
||||||
matchExpressions:
|
labelSelector:
|
||||||
- key: app
|
matchLabels:
|
||||||
operator: In
|
app: snmp-exporter
|
||||||
values:
|
|
||||||
- snmp-exporter
|
|
||||||
topologyKey: "kubernetes.io/hostname"
|
|
||||||
---
|
---
|
||||||
kind: Service
|
kind: Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
Loading…
Reference in New Issue
Block a user