Skip to content

Commit

Permalink
PR review updates 2
Browse files Browse the repository at this point in the history
  • Loading branch information
levan-m committed Mar 20, 2024
1 parent 29466d2 commit aff30f8
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 35 deletions.
2 changes: 1 addition & 1 deletion charts/datadog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ helm install <RELEASE_NAME> \
| agents.volumeMounts | list | `[]` | Specify additional volumes to mount in all containers of the agent pod |
| agents.volumes | list | `[]` | Specify additional volumes to mount in the dd-agent container |
| clusterAgent.additionalLabels | object | `{}` | Adds labels to the Cluster Agent deployment and pods |
| clusterAgent.admissionController.agentSidecarInjection.clusterAgentEnabled | bool | `true` | Enable communication between Agent sidecars and Cluster Agent. |
| clusterAgent.admissionController.agentSidecarInjection.clusterAgentCommunicationEnabled | bool | `true` | Enable communication between Agent sidecars and Cluster Agent. |
| clusterAgent.admissionController.agentSidecarInjection.containerRegistry | string | `nil` | |
| clusterAgent.admissionController.agentSidecarInjection.enabled | bool | `false` | Enables Datadog Agent sidecar injection. |
| clusterAgent.admissionController.agentSidecarInjection.imageName | string | `nil` | |
Expand Down
11 changes: 0 additions & 11 deletions charts/datadog/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -538,14 +538,3 @@ You are using the datadog.securityAgent.compliance.xccdf.enabled parameter which
This version still supports both but the support of the old name will be dropped in the next major version of our Helm chart.
More information about this change: https://github.com/DataDog/helm-charts/pull/1161
{{- end }}

{{- if .Values.clusterAgent.admissionController.agentSidecarInjection.enabled }}
{{- if (semverCompare "<7.52.0" .Values.clusterAgent.image.tag) }}
##############################################################################
#### WARNING: Sidecar injection not supported. ####
##############################################################################

The clusterAgent.admissionController.agentSidecarInjection.enabled is only supported
by Cluster Agent 7.52.0 or later. Enabling this flag will not have any effect.
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion charts/datadog/templates/_ac-agent-sidecar-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- if and .Values.clusterAgent.admissionController.enabled .Values.clusterAgent.admissionController.agentSidecarInjection.enabled }}
- name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_ENABLED
value: "true"
{{- if .Values.clusterAgent.admissionController.agentSidecarInjection.clusterAgentEnabled }}
{{- if .Values.clusterAgent.admissionController.agentSidecarInjection.clusterAgentCommunicationEnabled }}
- name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_CLUSTER_AGENT_ENABLED
value: "true"
{{- else }}
Expand Down
4 changes: 2 additions & 2 deletions charts/datadog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1073,8 +1073,8 @@ clusterAgent:
## ref: https://docs.datadoghq.com/integrations/eks_fargate
provider:

# clusterAgent.admissionController.agentSidecarInjection.clusterAgentEnabled -- Enable communication between Agent sidecars and Cluster Agent.
clusterAgentEnabled: true
# clusterAgent.admissionController.agentSidecarInjection.clusterAgentCommunicationEnabled -- Enable communication between Agent sidecars and Cluster Agent.
clusterAgentCommunicationEnabled: true

# clusterAgent.admissionController.containerRegistry -- Override the default registry for the sidecar Agent.
containerRegistry:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:

name: datadog-clusterchecks
annotations:
checksum/clusteragent_token: a7b52599b01423cf3965706e0920b246791b7d3dbeacdd10a3e77462f9c06287
checksum/clusteragent_token: 999b326e98e9596150bcbfd45becfdc4695634b0d8198c59d43ce7043ac9a611
checksum/install_info: 3c5d7a2732f453d72b241f37b74f59319bcbf51e387a8fc35dc47bc4a1a7a390
spec:
serviceAccountName: datadog-cluster-checks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:

name: datadog-cluster-agent
annotations:
checksum/clusteragent_token: 907d5b108dbdd20f2fbb8df8d32907ff14c9cc7f0b6fdfd2d2230b14efc80a9e
checksum/clusteragent_token: cb4b859f7f7c7e495dcca4e6471a201cf8c7eb77134fbcaaf27e5a5b5ef1b9b8
checksum/clusteragent-configmap: c4ebd3c35d77ac0260f47e1ec10c9733cd76488f4232f76f26466174b922b430
checksum/api_key: 3c042e07978640da60c9adc10c03acb2e68c176d8f5ecc4c1c8d216051f476a5
checksum/application_key: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:

name: datadog-cluster-agent
annotations:
checksum/clusteragent_token: f0a59c1f14610a12f8f5f69204a76d704736b3ae625b1efc46d01b26fd6ca1ca
checksum/clusteragent_token: cc4689bbc5f524d4080b164c621500d7f830d0aeef415c86a3535e76883577a3
checksum/clusteragent-configmap: c4ebd3c35d77ac0260f47e1ec10c9733cd76488f4232f76f26466174b922b430
checksum/api_key: 3c042e07978640da60c9adc10c03acb2e68c176d8f5ecc4c1c8d216051f476a5
checksum/application_key: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
Expand Down Expand Up @@ -116,7 +116,7 @@ spec:
- name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_IMAGE_NAME
value: agent
- name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_IMAGE_TAG
value: 7.53.0
value: 7.52.0
- name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_SELECTORS
value: '[{"namespaceSelector":{"matchLabels":{"agentSidecars":"true"}},"objectSelector":{"matchLabels":{"app":"nginx","runsOn":"nodeless"}}}]'
- name: DD_ADMISSION_CONTROLLER_AGENT_SIDECAR_PROFILES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:

name: datadog-cluster-agent
annotations:
checksum/clusteragent_token: ee40b3d003430647a21fb3c491d5dd5db6c950e2d9a2ae03e680eeb6532fc117
checksum/clusteragent_token: 20307ad626ccec1c8abc4b8c42089120fea2bcbc8d51ad48f052fc9d7f1ac62e
checksum/clusteragent-configmap: c4ebd3c35d77ac0260f47e1ec10c9733cd76488f4232f76f26466174b922b430
checksum/api_key: 3c042e07978640da60c9adc10c03acb2e68c176d8f5ecc4c1c8d216051f476a5
checksum/application_key: 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b
Expand Down
2 changes: 1 addition & 1 deletion test/datadog/baseline/daemonset_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:

name: datadog
annotations:
checksum/clusteragent_token: fabb09123bf6e665c21faa8e124e717b0ae57261e5907c9c7a68fb74f704002d
checksum/clusteragent_token: de10bbc694d3c44c7863afc67c2921c921466f00bae249eddfd43d06f0e40e83
checksum/install_info: 3c5d7a2732f453d72b241f37b74f59319bcbf51e387a8fc35dc47bc4a1a7a390
checksum/autoconf-config: 74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b
checksum/confd-config: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
Expand Down
12 changes: 6 additions & 6 deletions test/datadog/baseline/other_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ metadata:
app.kubernetes.io/version: "7"
type: Opaque
data:
token: "Y3NWTDR4VEppUDRNY01FQlJNMXJOVjVuNWNWU2JqVTk="
token: "TkNSTkV5UlJqdjhHV0NWcmduMmRBaWdqTUw2WmdsV2g="
---
# Source: datadog/templates/cluster-agent-confd-configmap.yaml
apiVersion: v1
Expand Down Expand Up @@ -185,9 +185,9 @@ metadata:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/version: "7"
data:
install_id: "e2010bea-3e6c-4fbd-b73e-d31a1b6074e9"
install_id: "fd55046d-8dfc-47a6-9fb7-20088a93ea58"
install_type: k8s_manual
install_time: "1710943122"
install_time: "1710950775"
---
# Source: datadog/templates/cluster-agent-rbac.yaml
apiVersion: "rbac.authorization.k8s.io/v1"
Expand Down Expand Up @@ -808,7 +808,7 @@ spec:

name: datadog
annotations:
checksum/clusteragent_token: 9960830a19c4a7f387ba7719619843f02f6870ac1fb005e6c170f59d97e0b4e6
checksum/clusteragent_token: d1284848a462e5feb13cfbc55a8d3eb48c477b6916832a592867cb5a4a9e4969
checksum/install_info: 3c5d7a2732f453d72b241f37b74f59319bcbf51e387a8fc35dc47bc4a1a7a390
checksum/autoconf-config: 74234e98afe7498fb5daf1f36ac2d78acc339464f950703b8c019892f982b90b
checksum/confd-config: 44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a
Expand Down Expand Up @@ -1290,7 +1290,7 @@ spec:

name: datadog-clusterchecks
annotations:
checksum/clusteragent_token: b5ffc5adda7fdc95189943962746b2980aa3e728104bd0976096f5fbcdda0fcc
checksum/clusteragent_token: d56cd35d2ed589e9817382c6d02cf18a1d24772863e156f83e78a038ee24b51d
checksum/install_info: 3c5d7a2732f453d72b241f37b74f59319bcbf51e387a8fc35dc47bc4a1a7a390
spec:
serviceAccountName: datadog-cluster-checks
Expand Down Expand Up @@ -1471,7 +1471,7 @@ spec:

name: datadog-cluster-agent
annotations:
checksum/clusteragent_token: edf6caf3a41752b756f3b78d690a3459b91054333b2336e4d9f54e05d48a1890
checksum/clusteragent_token: 9f86485d7f07627ccbd29f3ad3996ceb1fa57403f055c1b15e7c6919f944a2c1
checksum/clusteragent-configmap: 4bd988547c8c6cc1f177d466bee234b3d51f96bd8f1177244bd0cca5cdea8082
checksum/install_info: 3c5d7a2732f453d72b241f37b74f59319bcbf51e387a8fc35dc47bc4a1a7a390
spec:
Expand Down
2 changes: 1 addition & 1 deletion test/datadog/dca_AC_sidecar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func verifyDeploymentAdvancedConfig(t *testing.T, manifest string) {
assert.Empty(t, acConfigEnv[DDSidecarProvider])
assert.Equal(t, "gcr.io/datadoghq", acConfigEnv[DDSidecarRegistry])
assert.Equal(t, "agent", acConfigEnv[DDSidecarImageName])
assert.Equal(t, "7.53.0", acConfigEnv[DDSidecarImageTag])
assert.Equal(t, "7.52.0", acConfigEnv[DDSidecarImageTag])
assert.NotEmpty(t, acConfigEnv[DDSidecarSelectors])
assert.NotEmpty(t, acConfigEnv[DDSidecarProfiles])

Expand Down
4 changes: 2 additions & 2 deletions test/datadog/manifests/dca_AC_sidecar_advanced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ clusterAgent:
enabled: true
agentSidecarInjection:
enabled: true
clusterAgentEnabled: false
clusterAgentCommunicationEnabled: false
containerRegistry: gcr.io/datadoghq
imageName: agent
imageTag: 7.53.0
imageTag: 7.52.0
selectors:
- objectSelector:
matchLabels:
Expand Down
6 changes: 1 addition & 5 deletions test/datadog/manifests/dca_AC_sidecar_fargateMinimal.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
# agents:
# image:
# tag: 7.51.0

clusterAgent:
enabled: true
admissionController:
enabled: true
clusterAgentEnabled: false
clusterAgentCommunicationEnabled: false
agentSidecarInjection:
enabled: true
provider: fargate

0 comments on commit aff30f8

Please sign in to comment.