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) Both are [deployed by ArgoCD](https://argocd.k-space.ee/applications/monitoring)
from this Git repo directory using Prometheus operator. from this Git repo directory using Prometheus operator.
Note that Prometheus and other monitoring stack components should use the Note that Prometheus and other monitoring stack components should appropriate
`dedicated: monitoring` Kubernetes node selector to make sure the components node selector to make sure the components get scheduled on nodes which are
get scheduled on `mon[1-3]` nodes which are hosted in a privileged VLAN where hosted in a privileged VLAN where they have access to UPS SNMP targets,
they have access to UPS SNMP targets, Mikrotik router/switch API-s etc. Mikrotik router/switch API-s etc.
To add monitoring targets inside the Kubernetes cluster make use of 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 [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: secrets:
- slack-secrets - slack-secrets
nodeSelector: nodeSelector:
dedicated: monitoring node-role.kubernetes.io/control-plane: ''
tolerations: tolerations:
- key: dedicated - key: node-role.kubernetes.io/control-plane
operator: Equal operator: Equal
value: monitoring value: ''
effect: NoSchedule effect: NoSchedule
replicas: 3 replicas: 3
serviceAccountName: alertmanager serviceAccountName: alertmanager

View File

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

View File

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

View File

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

View File

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

View File

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