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
|
||||
auth
|
||||
|
@ -6,6 +6,20 @@ metadata:
|
||||
name: main
|
||||
namespace: monitoring
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: alertmanager
|
||||
operator: In
|
||||
values:
|
||||
- main
|
||||
namespaces:
|
||||
- monitoring
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
baseImage: carlosedp/alertmanager
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/os: linux
|
||||
|
@ -6,6 +6,20 @@ metadata:
|
||||
name: k8s
|
||||
namespace: monitoring
|
||||
spec:
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- podAffinityTerm:
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: prometheus
|
||||
operator: In
|
||||
values:
|
||||
- k8s
|
||||
namespaces:
|
||||
- monitoring
|
||||
topologyKey: kubernetes.io/hostname
|
||||
weight: 100
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- name: alertmanager-main
|
||||
|
@ -1,7 +1,7 @@
|
||||
local k = import 'ksonnet/ksonnet.beta.3/k.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-kubeadm.libsonnet') +
|
||||
(import 'image_sources_versions.jsonnet') +
|
||||
|
Loading…
Reference in New Issue
Block a user