jsonnet: move files around
Signed-off-by: paulfantom <pawel@krupa.net.pl>
This commit is contained in:
38
jsonnet/kube-prometheus/addons/anti-affinity.libsonnet
Normal file
38
jsonnet/kube-prometheus/addons/anti-affinity.libsonnet
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
local antiaffinity(key, values, namespace) = {
|
||||
affinity: {
|
||||
podAntiAffinity: {
|
||||
preferredDuringSchedulingIgnoredDuringExecution: [
|
||||
{
|
||||
weight: 100,
|
||||
podAffinityTerm: {
|
||||
namespaces: [namespace],
|
||||
topologyKey: 'kubernetes.io/hostname',
|
||||
labelSelector: {
|
||||
matchExpressions: [{
|
||||
key: key,
|
||||
operator: 'In',
|
||||
values: values,
|
||||
}],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
alertmanager+:: {
|
||||
alertmanager+: {
|
||||
spec+:
|
||||
antiaffinity('alertmanager', [$._config.alertmanager.name], $._config.namespace),
|
||||
},
|
||||
},
|
||||
|
||||
prometheus+:: {
|
||||
prometheus+: {
|
||||
spec+:
|
||||
antiaffinity('prometheus', [$._config.prometheus.name], $._config.namespace),
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user