Adds the necessary RBACs for the Cluster Agent to modify the ValidatingWebhookConfigurations.
This is needed to support the new ValidatingAdmissionWebhook controller in the Agent's Admission Controller.
Special notes for your reviewer:
QA:
For the Datadog Agent Helm Chart
➜ helm install datadog-agent -f ~/Projects/work/datadog-dev/dev-helm.yaml ~/Projects/work/helm-charts/charts/datadog
W0830 15:00:05.497863 38547 warnings.go:70] spec.template.metadata.annotations[container.apparmor.security.beta.kubernetes.io/system-probe]: deprecated since v1.30; use the "appArmorProfile" field instead
W0830 15:00:05.503343 38547 warnings.go:70] spec.template.spec.containers[0].env[44]: hides previous definition of "DD_LANGUAGE_DETECTION_ENABLED", which may be dropped when using apply
NAME: datadog-agent
LAST DEPLOYED: Fri Aug 30 15:00:04 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Datadog agents are spinning up on each node in your cluster. After a few
minutes, you should see your agents starting in your event stream:
https://app.datadoghq.com/event/explorer
You disabled creation of Secret containing API key, therefore it is expected
that you create Secret named 'datadog-secret' which includes a key called 'api-key' containing the API key.
Since the Operator that applies the validatingwebhookconfigurations.admissionregistration.k8s.io RBACs to the Cluster Agent is not yet released, the Cluster Agent will not have the correct RBACs, that is expected.
➜ k exec -it deployments/datadog-cluster-agent -- agent status
[...]
====================
Admission Controller
====================
Webhooks info
-------------
ValidatingWebhookConfigurations name: datadog-webhook
Error: validatingwebhookconfigurations.admissionregistration.k8s.io "datadog-webhook" is forbidden: User "system:serviceaccount:default:datadog-cluster-agent" cannot get resource "validatingwebhookconfigurations" in API group "admissionregistration.k8s.io" at the cluster scope
MutatingWebhookConfigurations name: datadog-webhook
Created at: 2024-08-30 13:07:45 +0000 UTC
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
[x] Chart Version bumped
[x] Documentation has been updated with helm-docs (run: .github/helm-docs.sh)
[x] CHANGELOG.md has been updated
[x] Variables are documented in the README.md
[x] For Datadog Operator chart or value changes update the test baselines (run: make update-test-baselines)
What this PR does / why we need it:
Adds the necessary RBACs for the Cluster Agent to modify the
ValidatingWebhookConfigurations
.This is needed to support the new
ValidatingAdmissionWebhook
controller in the Agent's Admission Controller.Special notes for your reviewer:
QA: For the Datadog Agent Helm Chart
For the Datadog Operator Helm Chart:
Since the Operator that applies the
validatingwebhookconfigurations.admissionregistration.k8s.io
RBACs to the Cluster Agent is not yet released, the Cluster Agent will not have the correct RBACs, that is expected.Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]
.github/helm-docs.sh
)CHANGELOG.md
has been updatedREADME.md
make update-test-baselines
)