-
Notifications
You must be signed in to change notification settings - Fork 112
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
[CECO-1763] Controller for generic custom resource #1534
Conversation
type operation string | ||
|
||
const ( | ||
// mockSubresource is used to mock the subresource in tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way to avoid this in the prod code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could mock an HTTP client for the CRUD Go api, so we send requests there instead of the real API/a non existing client but that would be more convoluted/a general improvement for other controllers to have this mock server/client for API requests
Left some suggestions/nits. Overall looks good but handling of multiple resource APIs (in utils.go) can be refactored to more maintainable code. |
What does this PR do?
Introduces a generic controller relying on Datadog Go client to handle CRUD operations on multiple resources. Initial support includes notebooks and synthetics (api/browser tests).
Examples:
Additional Notes
Next steps:
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
datadogGenericResourceEnabled=true
inargs
for themanager
container to enable the controller, as well asDD_API_KEY
andDD_APP_KEY
in the envsChecklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label