mirror of
https://github.com/carlosedp/cluster-monitoring.git
synced 2024-11-20 19:07:17 +01:00
Added anti-affinity to Prometheus and alertmanager
This commit is contained in:
parent
7f9f0b8b83
commit
61f5a2927b
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
vendor
|
vendor
|
||||||
|
auth
|
||||||
|
@ -6,6 +6,20 @@ metadata:
|
|||||||
name: main
|
name: main
|
||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: alertmanager
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- main
|
||||||
|
namespaces:
|
||||||
|
- monitoring
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
weight: 100
|
||||||
baseImage: carlosedp/alertmanager
|
baseImage: carlosedp/alertmanager
|
||||||
nodeSelector:
|
nodeSelector:
|
||||||
beta.kubernetes.io/os: linux
|
beta.kubernetes.io/os: linux
|
||||||
|
@ -6,6 +6,20 @@ metadata:
|
|||||||
name: k8s
|
name: k8s
|
||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
spec:
|
spec:
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: prometheus
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- k8s
|
||||||
|
namespaces:
|
||||||
|
- monitoring
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
weight: 100
|
||||||
alerting:
|
alerting:
|
||||||
alertmanagers:
|
alertmanagers:
|
||||||
- name: alertmanager-main
|
- name: alertmanager-main
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet';
|
||||||
|
|
||||||
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
|
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
|
||||||
// (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') +
|
(import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') +
|
||||||
(import 'kube-prometheus/kube-prometheus-kops-coredns.libsonnet') +
|
(import 'kube-prometheus/kube-prometheus-kops-coredns.libsonnet') +
|
||||||
(import 'kube-prometheus/kube-prometheus-kubeadm.libsonnet') +
|
(import 'kube-prometheus/kube-prometheus-kubeadm.libsonnet') +
|
||||||
(import 'image_sources_versions.jsonnet') +
|
(import 'image_sources_versions.jsonnet') +
|
||||||
|
Loading…
Reference in New Issue
Block a user