1
0
forked from k-space/kube

Consolidate monitoring stack to Kube master nodes

This commit is contained in:
Lauri Võsandi 2024-08-23 07:58:26 +03:00
parent 18483197c9
commit 67fb6c3727
7 changed files with 28 additions and 29 deletions

View File

@ -5,10 +5,10 @@ and the corresponding AlertManager is accessible at [am.k-space.ee](https://am.k
Both are [deployed by ArgoCD](https://argocd.k-space.ee/applications/monitoring)
from this Git repo directory using Prometheus operator.
Note that Prometheus and other monitoring stack components should use the
`dedicated: monitoring` Kubernetes node selector to make sure the components
get scheduled on `mon[1-3]` nodes which are hosted in a privileged VLAN where
they have access to UPS SNMP targets, Mikrotik router/switch API-s etc.
Note that Prometheus and other monitoring stack components should appropriate
node selector to make sure the components get scheduled on nodes which are
hosted in a privileged VLAN where they have access to UPS SNMP targets,
Mikrotik router/switch API-s etc.
To add monitoring targets inside the Kubernetes cluster make use of
[PodMonitor](https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/getting-started.md#using-podmonitors) or ServiceMonitor custom

View File

@ -48,11 +48,11 @@ spec:
secrets:
- slack-secrets
nodeSelector:
dedicated: monitoring
node-role.kubernetes.io/control-plane: ''
tolerations:
- key: dedicated
- key: node-role.kubernetes.io/control-plane
operator: Equal
value: monitoring
value: ''
effect: NoSchedule
replicas: 3
serviceAccountName: alertmanager

View File

@ -180,13 +180,12 @@ spec:
- name: blackbox-exporter-config
configMap:
name: blackbox-exporter-config
# TODO: Results in odd 6s connection lag if scheduled in VLAN20
nodeSelector:
dedicated: monitoring
node-role.kubernetes.io/control-plane: ''
tolerations:
- key: dedicated
- key: node-role.kubernetes.io/control-plane
operator: Equal
value: monitoring
value: ''
effect: NoSchedule
topologySpreadConstraints:
- maxSkew: 1

View File

@ -85,12 +85,12 @@ spec:
matchLabels:
app: mikrotik-exporter
nodeSelector:
dedicated: monitoring
node-role.kubernetes.io/control-plane: ''
tolerations:
- key: dedicated
operator: Equal
value: monitoring
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Equal
value: ''
effect: NoSchedule
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:

View File

@ -39,12 +39,12 @@ spec:
- NET_ADMIN
- NET_RAW
nodeSelector:
dedicated: monitoring
node-role.kubernetes.io/control-plane: ''
tolerations:
- key: dedicated
operator: Equal
value: monitoring
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Equal
value: ''
effect: NoSchedule
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone

View File

@ -24,11 +24,11 @@ spec:
app.kubernetes.io/instance: prometheus
app.kubernetes.io/name: prometheus
nodeSelector:
dedicated: monitoring
node-role.kubernetes.io/control-plane: ''
tolerations:
- key: dedicated
- key: node-role.kubernetes.io/control-plane
operator: Equal
value: monitoring
value: ''
effect: NoSchedule
alerting:
alertmanagers:

View File

@ -39,12 +39,12 @@ spec:
configMap:
name: snmp-exporter
nodeSelector:
dedicated: monitoring
node-role.kubernetes.io/control-plane: ''
tolerations:
- key: dedicated
operator: Equal
value: monitoring
effect: NoSchedule
- key: node-role.kubernetes.io/control-plane
operator: Equal
value: ''
effect: NoSchedule
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone