-
Notifications
You must be signed in to change notification settings - Fork 129
[profiles] Add create strategy to ddai #2367
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2367 +/- ##
==========================================
+ Coverage 37.01% 37.07% +0.05%
==========================================
Files 288 288
Lines 24453 24553 +100
==========================================
+ Hits 9051 9102 +51
- Misses 14698 14739 +41
- Partials 704 712 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
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.
Small: we do not use the lastTransition field in DDAI version unlike in DDA:
datadog-operator/internal/controller/datadogagent/controller_reconcile_v2_common.go
Lines 233 to 235 in baccb07
| if profile.Status.CreateStrategy.Status != newStatus { | |
| profile.Status.CreateStrategy.LastTransition = &now | |
| } |
created #2407 (check first commit "only", 2nd is test) as a suggestion but can be dropped
| } | ||
|
|
||
| func (r *Reconciler) getProfileDaemonSet(ctx context.Context, profile *v1alpha1.DatadogAgentProfile, dsName types.NamespacedName) (*appsv1.DaemonSet, error) { | ||
| validDaemonSetNames, _ := r.getValidDaemonSetNames(dsName.Name, map[string]struct{}{}, []v1alpha1.DatadogAgentProfile{*profile}, true) |
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.
| validDaemonSetNames, _ := r.getValidDaemonSetNames(dsName.Name, map[string]struct{}{}, []v1alpha1.DatadogAgentProfile{*profile}, true) | |
| // TODO: introspection - we pass an empty provider list | |
| validDaemonSetNames, _ := r.getValidDaemonSetNames(dsName.Name, map[string]struct{}{}, []v1alpha1.DatadogAgentProfile{*profile}, true) |
Comment so when we start supporting introspection, so we don't forget ?
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.
note: the spacing might be off, I manually added spaces when creating this suggestion, I wouldn't commit it from github UI
| info := csInfo[profileNSName] | ||
| if info == nil { | ||
| return false | ||
| } | ||
|
|
||
| return true |
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.
| info := csInfo[profileNSName] | |
| if info == nil { | |
| return false | |
| } | |
| return true | |
| return csInfo[profileNSName] != nil |
nit: little simplification ?
What does this PR do?
Add create strategy to DDAIs for parity. The create strategy code for DDAs can be deleted later with reconcileV2
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?
Describe your test plan
In a cluster with multiple nodes:
kubectl describe dap <name>. The status can be:Create Strategy: Max Unavailable: <maxUnavailable> # should match maxUnavailable from a manifest (or use default value) Nodes Labeled: <number of labeled nodes> # the number of nodes labeled with the profile label "agent.datadoghq.com/datadogagentprofile" Pods Ready: <number of ready pods> # the number of pods whose status is ready Status: Waiting # create strategy status can be waiting, in progress, or completedYou can have things like:
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel