jsonnet: export anti-affinity addon
Export the antiaffinity function of the anti-affinity addon to make it possible to extend the addon to component that are not present in the kube-prometheus stack. Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
local antiaffinity(labelSelector, namespace, type, topologyKey) = {
|
antiaffinity(labelSelector, namespace, type, topologyKey): {
|
||||||
local podAffinityTerm = {
|
local podAffinityTerm = {
|
||||||
namespaces: [namespace],
|
namespaces: [namespace],
|
||||||
topologyKey: topologyKey,
|
topologyKey: topologyKey,
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
alertmanager+: {
|
alertmanager+: {
|
||||||
alertmanager+: {
|
alertmanager+: {
|
||||||
spec+:
|
spec+:
|
||||||
antiaffinity(
|
$.antiaffinity(
|
||||||
$.alertmanager._config.selectorLabels,
|
$.alertmanager._config.selectorLabels,
|
||||||
$.values.common.namespace,
|
$.values.common.namespace,
|
||||||
$.values.alertmanager.podAntiAffinity,
|
$.values.alertmanager.podAntiAffinity,
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
prometheus+: {
|
prometheus+: {
|
||||||
prometheus+: {
|
prometheus+: {
|
||||||
spec+:
|
spec+:
|
||||||
antiaffinity(
|
$.antiaffinity(
|
||||||
$.prometheus._config.selectorLabels,
|
$.prometheus._config.selectorLabels,
|
||||||
$.values.common.namespace,
|
$.values.common.namespace,
|
||||||
$.values.prometheus.podAntiAffinity,
|
$.values.prometheus.podAntiAffinity,
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
spec+: {
|
spec+: {
|
||||||
template+: {
|
template+: {
|
||||||
spec+:
|
spec+:
|
||||||
antiaffinity(
|
$.antiaffinity(
|
||||||
$.blackboxExporter._config.selectorLabels,
|
$.blackboxExporter._config.selectorLabels,
|
||||||
$.values.common.namespace,
|
$.values.common.namespace,
|
||||||
$.values.blackboxExporter.podAntiAffinity,
|
$.values.blackboxExporter.podAntiAffinity,
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
spec+: {
|
spec+: {
|
||||||
template+: {
|
template+: {
|
||||||
spec+:
|
spec+:
|
||||||
antiaffinity(
|
$.antiaffinity(
|
||||||
$.prometheusAdapter._config.selectorLabels,
|
$.prometheusAdapter._config.selectorLabels,
|
||||||
$.values.common.namespace,
|
$.values.common.namespace,
|
||||||
$.values.prometheusAdapter.podAntiAffinity,
|
$.values.prometheusAdapter.podAntiAffinity,
|
||||||
|
|||||||
Reference in New Issue
Block a user