Skip to content

Commit 5969896

Browse files
author
Houman Moallemi
committed
feat: Made PDB minAvailable configurable and moved pdb creation to pdb block
1 parent afefd95 commit 5969896

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

charts/datadog/templates/agent-clusterchecks-pdb.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.clusterChecksRunner.createPodDisruptionBudget -}}
1+
{{- if .Values.clusterChecksRunner.createPodDisruptionBudget .Values.clusterChecksRunner.pdb.enable -}}
22
apiVersion: {{ template "policy.poddisruptionbudget.apiVersion" . }}
33
kind: PodDisruptionBudget
44
metadata:
@@ -7,7 +7,7 @@ metadata:
77
labels:
88
{{ include "datadog.labels" . | indent 4 }}
99
spec:
10-
maxUnavailable: 1
10+
maxUnavailable: {{ .Values.clusterChecksRunner.pdb.minAvailable | default 1 }}
1111
selector:
1212
matchLabels:
1313
app: {{ template "datadog.fullname" . }}-clusterchecks

charts/datadog/templates/cluster-agent-pdb.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.clusterAgent.createPodDisruptionBudget -}}
1+
{{- if or .Values.clusterAgent.createPodDisruptionBudget .Values.clusterAgent.pdb.enablee -}}
22
apiVersion: {{ template "policy.poddisruptionbudget.apiVersion" . }}
33
kind: PodDisruptionBudget
44
metadata:
@@ -7,7 +7,7 @@ metadata:
77
labels:
88
{{ include "datadog.labels" . | indent 4 }}
99
spec:
10-
minAvailable: 1
10+
minAvailable: {{ .Values.clusterAgent.pdb.minAvailable | default 1 }}
1111
selector:
1212
matchLabels:
1313
app: {{ template "datadog.fullname" . }}-cluster-agent

charts/datadog/values.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,13 @@ clusterAgent:
16561656
datadog_cluster_yaml: {}
16571657

16581658
# clusterAgent.createPodDisruptionBudget -- Create pod disruption budget for Cluster Agent deployments
1659-
createPodDisruptionBudget: false
1659+
createPodDisruptionBudget: false # To be deprecated
1660+
# Define PodDisruptionBudget for Cluster Agent deployments
1661+
pdb:
1662+
# clusterAgent.pdb.create -- Create pod disruption budget for Cluster Agent deployments
1663+
create: false
1664+
# clusterAgent.pdb.minAvailable -- PDB minAvailable to be available at all times
1665+
minAvailable: 1
16601666

16611667
networkPolicy:
16621668
# clusterAgent.networkPolicy.create -- If true, create a NetworkPolicy for the cluster agent.
@@ -2395,7 +2401,13 @@ clusterChecksRunner:
23952401
# - name: "<REG_SECRET>"
23962402

23972403
# clusterChecksRunner.createPodDisruptionBudget -- Create the pod disruption budget to apply to the cluster checks agents
2398-
createPodDisruptionBudget: false
2404+
createPodDisruptionBudget: false # To be deprecated
2405+
# Define PodDisruptionBudget for cluster checks agents
2406+
pdb:
2407+
# clusterChecksRunner.pdb.create -- Create the pod disruption budget to apply to the cluster checks agents
2408+
create: false
2409+
# clusterChecksRunner.pdb.minAvailable -- PDB minAvailable to be available at all times
2410+
minAvailable: 1
23992411

24002412
# Provide Cluster Checks Deployment pods RBAC configuration
24012413
rbac:

0 commit comments

Comments
 (0)