diff --git a/jsonnet/kube-prometheus/components/alertmanager.libsonnet b/jsonnet/kube-prometheus/components/alertmanager.libsonnet index aca1a866..569ee82b 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 1a82b3e6..0c6d359f 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: {