Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option in DatadogAgent CRD to disable nonResourceRules #1074

Merged
merged 1 commit into from Feb 9, 2024

Conversation

celenechang
Copy link
Contributor

@celenechang celenechang commented Feb 8, 2024

What does this PR do?

Add CRD option to disable nonResource RBAC rules. This is required for the Operator to properly run in Google Cloud Marketplace.

Motivation

What inspired you to submit this pull request?

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

  • Login to GKE test cluster running a deployer image
  • Update image in Operator deployment
  • Apply a DatadogAgent manifest without spec.global.disableNonResourceRules - should observe errors in the Operator logs and no datadog-agent ClusterRole
  • Apply a DatadogAgent manifest with spec.global.disableNonResourceRules=true - errors should be gone and ClusterRole should be present

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

@celenechang celenechang added the enhancement New feature or request label Feb 8, 2024
@celenechang celenechang added this to the v1.4.0 milestone Feb 8, 2024
@celenechang celenechang requested review from a team as code owners February 8, 2024 03:45
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2024

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (6f5b5c5) 58.58% compared to head (4996cb3) 58.56%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1074      +/-   ##
==========================================
- Coverage   58.58%   58.56%   -0.03%     
==========================================
  Files         166      166              
  Lines       20513    20521       +8     
==========================================
  Hits        12018    12018              
- Misses       7767     7775       +8     
  Partials      728      728              
Flag Coverage Δ
unittests 58.56% <5.55%> (-0.03%) ⬇️

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

Files Coverage Δ
apis/datadoghq/v2alpha1/datadogagent_types.go 100.00% <ø> (ø)
controllers/datadogagent/clusteragent.go 58.55% <100.00%> (ø)
controllers/datadogagent/component/agent/rbac.go 0.00% <0.00%> (ø)
...adogagent/component/clusterchecksrunner/default.go 0.68% <0.00%> (-0.01%) ⬇️

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 6f5b5c5...4996cb3. Read the comment docs.

@celenechang celenechang merged commit 06cd34f into main Feb 9, 2024
21 checks passed
@celenechang celenechang deleted the celene/nonresource_rbac branch February 9, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants