Skip to content

Commit

Permalink
Merge pull request #3 from DataDog/vboulineau/final_import
Browse files Browse the repository at this point in the history
Import from stable/datadog
  • Loading branch information
vboulineau authored Jul 29, 2020
2 parents a9caa42 + b33f719 commit fc9d6ff
Show file tree
Hide file tree
Showing 21 changed files with 184 additions and 61 deletions.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Describe what happened:**


**Describe what you expected:**


**Steps to reproduce the issue:**


**Additional environment details (Operating System, Cloud provider, etc):**

5 changes: 2 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ jobs:
strategy:
matrix:
k8s:
#- v1.14.10 - Currently fails due to
# WARN - datadog/templates/agent-apiservice.yaml contains an invalid APIService (v1beta1.external.metrics.k8s.io) - port: Additional property port is not allowed
- v1.14.10
- v1.16.9
- v1.18.4
steps:
Expand All @@ -54,7 +53,7 @@ jobs:
strategy:
matrix:
k8s:
#- v1.14.10
- v1.14.10
- v1.16.9
- v1.18.4
steps:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ You need to add this repository to your Helm repositories:

```
helm repo add datadog https://helm.datadoghq.com
helm repo update
```
26 changes: 26 additions & 0 deletions charts/datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
# Datadog changelog

## Changelog is now available through Git history/GitHub tags, previous tags kept as reference

## 2.3.41

* Fix issue with Kubernetes <= 1.14 and Cluster Agent's External Metrics Provider (must be 443)

## 2.3.40

* Update documentation for resource requests & limits default values.

## 2.3.39

* Propagate `datadog.checksd` to the clusterchecks runner to support custom checks there.

## 2.3.38

* Add support of DD\_CONTAINER\_{INCLUDE,EXCLUDE}\_{METRICS,LOGS}

## 2.3.37

* Add NET\_BROADCAST capability

## 2.3.36

* Bump default Agent version to `7.21.1`

## 2.3.35

* Add support for configuring the Datadog Admission Controller
Expand Down
20 changes: 3 additions & 17 deletions charts/datadog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: datadog
version: 2.3.36
version: 2.4.0
appVersion: "7"
description: Datadog Agent
keywords:
Expand All @@ -13,19 +13,5 @@ sources:
- https://app.datadoghq.com/account/settings#agent/kubernetes
- https://github.com/DataDog/datadog-agent
maintainers:
- name: ahmed-mez
email: ahmed.mezghani@datadoghq.com
- name: celenechang
email: celene@datadoghq.com
- name: charlyf
email: charly@datadoghq.com
- name: clamoriniere
email: cedric.lamoriniere@datadoghq.com
- name: irabinovitch
email: ilan@datadoghq.com
- name: L3n41c
email: lenaic.huard@datadoghq.com
- name: vboulineau
email: vincent.boulineau@datadoghq.com
- name: xornivore
email: ivan.ilichev@datadoghq.com
- name: Datadog
email: support@datadoghq.com
79 changes: 47 additions & 32 deletions charts/datadog/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
kubeStateMetricsEnabled: false
clusterChecks:
enabled: true

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
kubeStateMetricsEnabled: false

clusterAgent:
enabled: true
Expand Down
1 change: 1 addition & 0 deletions charts/datadog/ci/cluster-agent-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ datadog:
clusterName: kubernetes-cluster.example.com
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
kubeStateMetricsEnabled: false
clusterChecks:
enabled: true

Expand Down
1 change: 1 addition & 0 deletions charts/datadog/ci/dogstastd-socket-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
kubeStateMetricsEnabled: false

dogstatsd:
useSocketVolume: true
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/ci/kubeval.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ clusterAgent:
nodeSelector:
kubernetes.io/os: linux
metricsProvider:
enabled: true
enabled: false
admissionController:
enabled: true
mutateUnlabelled: true
Expand Down
1 change: 1 addition & 0 deletions charts/datadog/ci/no_hardened_seccomp-values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
kubeStateMetricsEnabled: false
systemProbe:
enabled: true
seccomp: runtime/default
2 changes: 1 addition & 1 deletion charts/datadog/ci/psp-test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"

kubeStateMetricsEnabled: false
agents:
podSecurity:
podSecurityPolicy:
Expand Down
1 change: 1 addition & 0 deletions charts/datadog/ci/securitycontext-nil-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
datadog:
apiKey: "00000000000000000000000000000000"
appKey: "0000000000000000000000000000000000000000"
kubeStateMetricsEnabled: false

securityContext:
11 changes: 11 additions & 0 deletions charts/datadog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ beta.kubernetes.io/os
{{- end -}}
{{- end -}}

{{/*
Correct `clusterAgent.metricsProvider.service.port` if Kubernetes <= 1.15
*/}}
{{- define "clusterAgent.metricsProvider.port" -}}
{{- if semverCompare "^1.15-0" .Capabilities.KubeVersion.GitVersion -}}
{{- .Values.clusterAgent.metricsProvider.service.port -}}
{{- else -}}
443
{{- end -}}
{{- end -}}

{{/*
Return the container runtime socket
*/}}
Expand Down
4 changes: 3 additions & 1 deletion charts/datadog/templates/agent-apiservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ spec:
service:
name: {{ template "datadog.fullname" . }}-cluster-agent-metrics-api
namespace: {{ .Release.Namespace }}
port: {{ .Values.clusterAgent.metricsProvider.service.port }}
{{- if semverCompare "^1.15-0" .Capabilities.KubeVersion.GitVersion }}
port: {{ template "clusterAgent.metricsProvider.port" . }}
{{- end }}
version: v1beta1
insecureSkipTLSVerify: true
group: external.metrics.k8s.io
Expand Down
43 changes: 42 additions & 1 deletion charts/datadog/templates/agent-clusterchecks-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ spec:
labels:
app: {{ template "datadog.fullname" . }}-clusterchecks
name: {{ template "datadog.fullname" . }}-clusterchecks
annotations:
{{- if .Values.datadog.checksd }}
checksum/checksd-config: {{ tpl (toYaml .Values.datadog.checksd) . | sha256sum }}
{{- end }}
spec:
{{- if .Values.clusterChecksRunner.rbac.dedicated }}
serviceAccountName: {{ if .Values.clusterChecksRunner.rbac.create }}{{ template "datadog.fullname" . }}-cluster-checks{{ else }}"{{ .Values.clusterChecksRunner.rbac.serviceAccountName }}"{{ end }}
Expand All @@ -33,6 +37,34 @@ spec:
dnsConfig:
{{ toYaml .Values.clusterChecksRunner.dnsConfig | indent 8 }}
{{- end }}
initContainers:
- name: init-volume
image: "{{ .Values.agents.image.repository }}:{{ .Values.agents.image.tag }}"
imagePullPolicy: {{ .Values.agents.image.pullPolicy }}
command: ["bash", "-c"]
args:
- cp -r /etc/datadog-agent /opt
volumeMounts:
- name: config
mountPath: /opt/datadog-agent
resources:
{{ toYaml .Values.agents.containers.initContainers.resources | indent 10 }}
- name: init-config
image: "{{ .Values.agents.image.repository }}:{{ .Values.agents.image.tag }}"
imagePullPolicy: {{ .Values.agents.image.pullPolicy }}
command: ["bash", "-c"]
args:
- for script in $(find /etc/cont-init.d/ -type f -name '*.sh' | sort) ; do bash $script ; done
volumeMounts:
- name: config
mountPath: /etc/datadog-agent
{{- if .Values.datadog.checksd }}
- name: checksd
mountPath: /checks.d
readOnly: true
{{- end }}
resources:
{{ toYaml .Values.agents.containers.initContainers.resources | indent 10 }}
containers:
- name: agent
image: "{{ .Values.clusterChecksRunner.image.repository }}:{{ .Values.clusterChecksRunner.image.tag }}"
Expand Down Expand Up @@ -104,15 +136,24 @@ spec:
{{ toYaml .Values.clusterChecksRunner.resources | indent 10 }}
{{- if .Values.clusterChecksRunner.volumeMounts }}
volumeMounts:
- name: config
mountPath: {{ template "datadog.confPath" . }}
{{ toYaml .Values.clusterChecksRunner.volumeMounts | indent 10 }}
{{- end }}
livenessProbe:
{{ toYaml .Values.clusterChecksRunner.livenessProbe | indent 10 }}
readinessProbe:
{{ toYaml .Values.clusterChecksRunner.readinessProbe | indent 10 }}
{{- if .Values.clusterChecksRunner.volumes }}
volumes:
{{- if .Values.clusterChecksRunner.volumes }}
{{ toYaml .Values.clusterChecksRunner.volumes | indent 8 }}
{{- end }}
- name: config
emptyDir: {}
{{- if .Values.datadog.checksd }}
- name: checksd
configMap:
name: {{ template "datadog.fullname" . }}-checksd
{{- end }}
affinity:
{{- if .Values.clusterChecksRunner.affinity }}
Expand Down
2 changes: 1 addition & 1 deletion charts/datadog/templates/agent-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
selector:
app: {{ template "datadog.fullname" . }}-cluster-agent
ports:
- port: {{ .Values.clusterAgent.metricsProvider.service.port }}
- port: {{ template "clusterAgent.metricsProvider.port" . }}
name: metricsapi
protocol: TCP
{{ end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/datadog/templates/cluster-agent-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ spec:
name: agentport
protocol: TCP
{{- if .Values.clusterAgent.metricsProvider.enabled }}
- containerPort: {{ .Values.clusterAgent.metricsProvider.service.port }}
- containerPort: {{ template "clusterAgent.metricsProvider.port" . }}
name: metricsapi
protocol: TCP
{{- end }}
Expand All @@ -113,7 +113,7 @@ spec:
- name: DD_EXTERNAL_METRICS_PROVIDER_ENABLED
value: {{ .Values.clusterAgent.metricsProvider.enabled | quote }}
- name: DD_EXTERNAL_METRICS_PROVIDER_PORT
value: {{ .Values.clusterAgent.metricsProvider.service.port | quote }}
value: {{ include "clusterAgent.metricsProvider.port" . | quote }}
- name: DD_EXTERNAL_METRICS_PROVIDER_WPA_CONTROLLER
value: {{ .Values.clusterAgent.metricsProvider.wpaController | quote }}
- name: DD_EXTERNAL_METRICS_PROVIDER_USE_DATADOGMETRIC_CRD
Expand Down
24 changes: 24 additions & 0 deletions charts/datadog/templates/containers-common-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,30 @@
- name: DD_AC_EXCLUDE
value: {{ .Values.datadog.acExclude | quote }}
{{- end }}
{{- if .Values.datadog.containerInclude }}
- name: DD_CONTAINER_INCLUDE
value: {{ .Values.datadog.containerInclude | quote }}
{{- end }}
{{- if .Values.datadog.containerExclude }}
- name: DD_CONTAINER_EXCLUDE
value: {{ .Values.datadog.containerExclude | quote }}
{{- end }}
{{- if .Values.datadog.containerIncludeMetrics }}
- name: DD_CONTAINER_INCLUDE_METRICS
value: {{ .Values.datadog.containerIncludeMetrics | quote }}
{{- end }}
{{- if .Values.datadog.containerExcludeMetrics }}
- name: DD_CONTAINER_EXCLUDE_METRICS
value: {{ .Values.datadog.containerExcludeMetrics | quote }}
{{- end }}
{{- if .Values.datadog.containerIncludeLogs }}
- name: DD_CONTAINER_INCLUDE_LOGS
value: {{ .Values.datadog.containerIncludeLogs | quote }}
{{- end }}
{{- if .Values.datadog.containerExcludeLogs }}
- name: DD_CONTAINER_EXCLUDE_LOGS
value: {{ .Values.datadog.containerExcludeLogs | quote }}
{{- end }}
{{- if .Values.datadog.criSocketPath }}
- name: DD_CRI_SOCKET_PATH
value: {{ print "/host/" .Values.datadog.criSocketPath | clean }}
Expand Down
5 changes: 3 additions & 2 deletions charts/datadog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ agents:
## Define the Agent version to use.
## Use 7-jmx to enable jmx fetch collection
#
tag: 7.20.2
tag: 7.21.1

## @param doNotCheckTag - boolean - optional
## By default, the version passed in agents.image.tag is checked
Expand Down Expand Up @@ -750,6 +750,7 @@ agents:
- SYS_RESOURCE
- SYS_PTRACE
- NET_ADMIN
- NET_BROADCAST
- IPC_LOCK

## @param volumes - list - optional
Expand Down Expand Up @@ -1062,7 +1063,7 @@ clusterChecksRunner:
## Define the Agent version to use.
## Use 7-jmx to enable jmx fetch collection
#
tag: 7.20.2
tag: 7.21.1

## @param pullPolicy - string - required
## The Kubernetes pull policy.
Expand Down

0 comments on commit fc9d6ff

Please sign in to comment.