Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/datadog] Add PodDisruptionBudget to Cluster Agent and Cluster…
Browse files Browse the repository at this point in the history
… Check Runners (#21433)

Signed-off-by: Peter Rifel <pgrifel@gmail.com>
  • Loading branch information
rifelpet authored Mar 16, 2020
1 parent 346ea3c commit 84f684d
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stable/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 2.0.7
version: 2.0.8
appVersion: "7"
description: DataDog Agent
keywords:
Expand Down
2 changes: 2 additions & 0 deletions stable/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ helm install --name <RELEASE_NAME> \
| `clusterAgent.clusterChecks.enabled` | Enable Cluster Checks on both the Cluster Agent and the Agent daemonset | `false` |
| `clusterAgent.confd` | Additional check configurations (static and Autodiscovery) | `nil` |
| `clusterAgent.podAnnotations` | Annotations to add to the Cluster Agent Pod(s) | `nil` |
| `clusterAgent.createPodDisruptionBudget` | Enable a pod disruption budget to apply to the Cluster Agent pods | `false` |
| `clusterAgent.priorityClassName` | Name of the priorityClass to apply to the Cluster Agent | `nil` |
| `clusterAgent.nodeSelector` | Node selectors to apply to the Cluster Agent deployment | `nil` |
| `clusterAgent.resources.requests.cpu` | CPU resource requests | `200m` |
Expand All @@ -375,6 +376,7 @@ helm install --name <RELEASE_NAME> \
| `clusterAgent.volumeMounts` | Additional volumeMounts for the cluster-agent deployment | `nil` |
| `clusterChecksRunner.enabled` | Enable Datadog agent deployment dedicated for running Cluster Checks. It allows having different resources (Request/Limit) for Cluster Checks agent pods. | `false` |
| `clusterChecksRunner.env` | Additional Datadog environment variables for Cluster Checks Deployment | `nil` |
| `clusterChecksRunner.createPodDisruptionBudget` | Enable a pod disruption budget to apply to the Cluster Checks pods | `false` |
| `clusterChecksRunner.resources.requests.cpu` | CPU resource requests | `200m` |
| `clusterChecksRunner.resources.limits.cpu` | CPU resource limits | `200m` |
| `clusterChecksRunner.resources.requests.memory` | Memory resource requests | `256Mi` |
Expand Down
17 changes: 17 additions & 0 deletions stable/datadog/templates/agent-clusterchecks-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.clusterChecksRunner.createPodDisruptionBudget -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "datadog.fullname" . }}-clusterchecks
labels:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
app.kubernetes.io/name: "{{ template "datadog.fullname" . }}"
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
spec:
maxUnavailable: 1
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}-clusterchecks
{{- end -}}
17 changes: 17 additions & 0 deletions stable/datadog/templates/cluster-agent-pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.clusterAgent.createPodDisruptionBudget -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ template "datadog.fullname" . }}-cluster-agent
labels:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
app.kubernetes.io/name: "{{ template "datadog.fullname" . }}"
app.kubernetes.io/instance: {{ .Release.Name | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service | quote }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
spec:
minAvailable: 1
selector:
matchLabels:
app: {{ template "datadog.fullname" . }}-cluster-agent
{{- end -}}
10 changes: 10 additions & 0 deletions stable/datadog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,11 @@ clusterAgent:
#
# datadog_cluster_yaml: {}

## @param createPodDisruptionBudget - boolean - optional
## Specify the pod disruption budget to apply to the cluster agents
#
createPodDisruptionBudget: false

kubeStateMetrics:

## @param enabled - boolean - required
Expand Down Expand Up @@ -865,6 +870,11 @@ clusterChecksRunner:
# pullSecrets:
# - name: "<REG_SECRET>"

## @param createPodDisruptionBudget - boolean - optional
## Specify the pod disruption budget to apply to the cluster checks agents
#
createPodDisruptionBudget: false

## @param rbac - object - required
## Provide Cluster Checks Deployment pods RBAC configuration
rbac:
Expand Down

0 comments on commit 84f684d

Please sign in to comment.