Skip to content

Conversation

@fanny-jiang
Copy link
Contributor

What does this PR do?

Updates the cluster-agent cluster role and cluster role binding names to be prefixed with namespace. This pattern aligns with the feature-specific RBAC names (i.e. orchestrator explorer, KSM, etc).

Motivation

To prevent name collision with the datadog helm chart: after completing the Helm > Operator migration and user uninstalls the datadog chart release, the helm uninstall also uninstalls the operator-managed DCA clusterRole and clusterRoleBinding resources due to them sharing the same name with the helm-managed resources.

Additional Notes

Anything else we should know when reviewing?

Minimum Agent Versions

Are there minimum versions of the Datadog Agent and/or Cluster Agent required?

  • Agent: vX.Y.Z
  • Cluster Agent: vX.Y.Z

Describe your test plan

  1. Install previous operator version
  2. Observe the cluster agent clusterRole and clusterRoleBinding names
  3. Update operator deployment to use custom operator image containing this change
  4. Wait a few minutes and observe that the new cluster agent clusterRole and clusterRoleBinding have been created and the names follow the pattern <namespace>-datadog-cluster-agent
  5. Check that the cluster agent role has been

Checklist

  • PR has at least one valid label: bug, enhancement, refactoring, documentation, tooling, and/or dependencies
  • PR has a milestone or the qa/skip-qa label
  • All commits are signed (see: signing commits)

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 37.28%. Comparing base (517b3d1) to head (4a9bc51).

Files with missing lines Patch % Lines
...ler/datadogagent/component/clusteragent/default.go 0.00% 1 Missing ⚠️

❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2453   +/-   ##
=======================================
  Coverage   37.28%   37.28%           
=======================================
  Files         290      290           
  Lines       24708    24708           
=======================================
  Hits         9212     9212           
  Misses      14783    14783           
  Partials      713      713           
Flag Coverage Δ
unittests 37.28% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ler/datadogagent/component/clusteragent/default.go 98.67% <0.00%> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 517b3d1...4a9bc51. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants