diff --git a/jsonnet/kube-prometheus/components/alertmanager.libsonnet b/jsonnet/kube-prometheus/components/alertmanager.libsonnet index aca1a86619973961ef6cf4aee66414af5e34e1f4..569ee82b094e088e05bdc5280a68a4cdd88fbdd7 100644 --- a/jsonnet/kube-prometheus/components/alertmanager.libsonnet +++ b/jsonnet/kube-prometheus/components/alertmanager.libsonnet @@ -165,7 +165,7 @@ function(params) { }, }, - podDisruptionBudget: { + [if (defaults + params).replicas > 1 then 'podDisruptionBudget']: { apiVersion: 'policy/v1beta1', kind: 'PodDisruptionBudget', metadata: { diff --git a/jsonnet/kube-prometheus/components/prometheus.libsonnet b/jsonnet/kube-prometheus/components/prometheus.libsonnet index 1a82b3e620f9561160c8720976bf85a63be7e2fe..0c6d359f3a09aa67cb3f332ee1a21e4e0b28a831 100644 --- a/jsonnet/kube-prometheus/components/prometheus.libsonnet +++ b/jsonnet/kube-prometheus/components/prometheus.libsonnet @@ -236,7 +236,7 @@ function(params) { items: [newSpecificRole(x) for x in p.config.namespaces], }, - podDisruptionBudget: { + [if (defaults + params).replicas > 1 then 'podDisruptionBudget']: { apiVersion: 'policy/v1beta1', kind: 'PodDisruptionBudget', metadata: {