-
Notifications
You must be signed in to change notification settings - Fork 103
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
feat: DatadogAgent reconcileV2 skeleton #491
Conversation
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.
This pull request does not contain a valid label. Please add one of the following labels: bug, enhancement, refactoring, documentation, tooling
4cddea4
to
01dba10
Compare
Codecov Report
@@ Coverage Diff @@
## main #491 +/- ##
==========================================
- Coverage 59.68% 58.51% -1.18%
==========================================
Files 3 3
Lines 129 135 +6
==========================================
+ Hits 77 79 +2
- Misses 40 43 +3
- Partials 12 13 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
var resp reconcile.Result | ||
var err error | ||
|
||
if r.options.V2Enabled { |
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.
If we plan to keep it, this could be automated by checking the storageVersion
of the CRD
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.
I added this hack, to allow me to link the new code pass, but keep the current reconcile
function active to have all tests pass.
01dba10
to
5f80cd3
Compare
eaa7abd
to
7e5e5b5
Compare
7e5e5b5
to
f1b216a
Compare
Agent: feature.RequiredComponent{ | ||
IsRequired: &trueValue, | ||
}, | ||
} |
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.
so this "feature" ensures that the agent and cluster agent are enabled if nothing else is set?
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.
yes,
I will add in another PR the creation of the default associate resources: serviceAccount, condigmap, RBAC...
controllers/datadogagent/feature/kubernetesstatecore/feature.go
Outdated
Show resolved
Hide resolved
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.
overall looks great, thanks. do you mind adding the copyright to new files? (ok with me if it's easier in a separate PR)
c3a8620
to
b14b5da
Compare
b14b5da
to
19477c1
Compare
f.serviceAccountName = v2alpha1.GetClusterAgentServiceAccount(dda) | ||
if dda.Spec.Features.ClusterChecks != nil && apiutils.BoolValue(dda.Spec.Features.ClusterChecks.Enabled) { | ||
f.clusterChecksEnabled = true | ||
output.ClusterCheckRunner.IsRequired = &f.clusterChecksEnabled |
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.
should this be set to true
under if apiutils.BoolValue(dda.Spec.Features.ClusterChecks.UseClusterChecksRunners)
?
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.
right fixing now
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.
@celenechang
I made the fix in #496
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.
added a question, but it can be addressed in a subsequent PR
What does this PR do?
v2alpha1.DatadogAgent
reconcileV2
reconcileV2
.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Describe your test plan
Write there any instructions and details you may have to test your PR.