Skip to content

Commit 69a81e9

Browse files
committed
Use status instead of spec for Prometheus NAD reset
1 parent 4264bb9 commit 69a81e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controllers/metricstorage_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ func (r *MetricStorageReconciler) reconcileNormal(
578578
return ctrl.Result{}, err
579579
}
580580
instance.Status.NetworkAttachments = networkAnnotations
581-
} else if len(instance.Spec.NetworkAttachments) == 0 {
581+
} else if len(instance.Status.NetworkAttachments) != 0 {
582582
// Delete the prometheus CR, so it can be automatically restored without the NAD patch
583583
prometheus := monv1.Prometheus{
584584
ObjectMeta: metav1.ObjectMeta{

0 commit comments

Comments
 (0)