jsonnet: add PDB to alertmanager and prometheus pods
This commit is contained in:
@@ -165,6 +165,24 @@ function(params) {
|
||||
},
|
||||
},
|
||||
|
||||
podDisruptionBudget: {
|
||||
apiVersion: 'policy/v1beta1',
|
||||
kind: 'PodDisruptionBudget',
|
||||
metadata: {
|
||||
name: 'alertmanager-' + am.config.name,
|
||||
namespace: am.config.namespace,
|
||||
labels: am.config.commonLabels,
|
||||
},
|
||||
spec: {
|
||||
maxUnavailable: 1,
|
||||
selector: {
|
||||
matchLabels: {
|
||||
alertmanager: am.config.name,
|
||||
} + am.config.selectorLabels,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
alertmanager: {
|
||||
apiVersion: 'monitoring.coreos.com/v1',
|
||||
kind: 'Alertmanager',
|
||||
|
||||
@@ -236,6 +236,24 @@ function(params) {
|
||||
items: [newSpecificRole(x) for x in p.config.namespaces],
|
||||
},
|
||||
|
||||
podDisruptionBudget: {
|
||||
apiVersion: 'policy/v1beta1',
|
||||
kind: 'PodDisruptionBudget',
|
||||
metadata: {
|
||||
name: 'prometheus-' + p.config.name,
|
||||
namespace: p.config.namespace,
|
||||
labels: p.config.commonLabels,
|
||||
},
|
||||
spec: {
|
||||
minAvailable: 1,
|
||||
selector: {
|
||||
matchLabels: {
|
||||
prometheus: p.config.name,
|
||||
} + p.config.selectorLabels,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
prometheus: {
|
||||
apiVersion: 'monitoring.coreos.com/v1',
|
||||
kind: 'Prometheus',
|
||||
|
||||
Reference in New Issue
Block a user