pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/DataDog/datadog-operator/commit/d57a7fb47fe687384ded85c70a71828cb173a0b7

> [CONTP-1328] Remove conflict condition from status if no conflict (#2… · DataDog/datadog-operator@d57a7fb · GitHub
Skip to content

Commit d57a7fb

Browse files
authored
[CONTP-1328] Remove conflict condition from status if no conflict (#2634)
1 parent 2cfd498 commit d57a7fb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

internal/controller/datadogagentinternal/component_reconciler.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func (r *ComponentRegistry) Register(component ComponentReconciler) {
131131
func (r *ComponentRegistry) ReconcileComponents(ctx context.Context, params *ReconcileComponentParams) (reconcile.Result, error) {
132132
var result reconcile.Result
133133
now := metav1.NewTime(time.Now())
134+
hasConflict := false
134135

135136
for _, comp := range r.components {
136137
// Check if component is enabled and if there's a conflict
@@ -142,6 +143,7 @@ func (r *ComponentRegistry) ReconcileComponents(ctx context.Context, params *Rec
142143
if !enabled {
143144
// Component is disabled, clean it up
144145
if conflict {
146+
hasConflict = true
145147
// Set conflict status condition
146148
condition.UpdateDatadogAgentInternalStatusConditions(
147149
params.Status,
@@ -155,7 +157,6 @@ func (r *ComponentRegistry) ReconcileComponents(ctx context.Context, params *Rec
155157
}
156158
res, err = r.Cleanup(ctx, params, comp)
157159
} else {
158-
// Component is enabled, reconcile it
159160
res, err = r.reconcileComponent(ctx, params, comp)
160161
}
161162

@@ -169,6 +170,13 @@ func (r *ComponentRegistry) ReconcileComponents(ctx context.Context, params *Rec
169170
}
170171
}
171172

173+
// Clear conflict condition only after all components are processed and none has a conflict.
174+
// This prevents prematurely removing the condition when a later component is enabled
175+
// but an earlier one still has a conflict.
176+
if !hasConflict {
177+
condition.DeleteDatadogAgentInternalStatusCondition(params.Status, common.OverrideReconcileConflictConditionType)
178+
}
179+
172180
return result, nil
173181
}
174182

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy