-
Notifications
You must be signed in to change notification settings - Fork 627
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
Missing hint on a resource being suspended in the event log #5174
Comments
Personally I think there's not much value in this, if we add this event and you suspend a Kustomization on one day, in the next day the event won't be there anymore, Kubernetes deletes events after one hour (if you haven't changed this value in the Kubernetes API Server with the CLI flag |
I would rather see the event emitted as additional info to the reconciliation, if the Kustomization is suspended. So when a reconciliation is triggered on a suspended resource I can directly see from the events, that the reconciliation has no effect because of the suspension. Like so:
|
There's no such thing, if a Kustomization is suspended the controller does not requeue it after an interval. The reconciliation is only ever reconciled if the |
@matheuscscp looking at the code it seems that the "Reconciliation finished..." event message is emitted after every requeue interval even if the resource is suspended. This can be quite confusing since it makes it look like an active reconciliation took place when, in reality, it was a no-op. I think it would make sense to either:
What do you think? |
This is what you are looking for: Most specifically: return ctrl.Result{}, nil Which is the same as: return ctrl.Result{Requeue: false}, nil This causes I hope this clears the confusion. |
Thank you very much, @matheuscscp, for the explanation! This clarifies what caused the reconciliation. Nevertheless, it seems that changes to a resource that the Kustomization depends on do trigger “no-op” reconciliations. Given that, I still believe it would be helpful to explicitly mark their event messages as no-ops to avoid misunderstandings. (Actually, we’ve encountered this case in a real-world scenario and only later realized that the resource was suspended, as the message suggested that a reconciliation had occurred.) |
@norman-zon @scheying Are you guys willing to contribute this feature? We would need to change this across all Flux controllers. Just changing this string to mention that the object is suspended when that's the case would suffice: |
@matheuscscp sure! We'll come up with a PR/PRs. |
@scheying Thanks! We are planning to release source-controller this Thursday, and we will only merge any PRs if we have PRs for all controllers, this is because the Flux 2.5 release is close, we're planning it for end of next week. Otherwise we will ship all PRs in Flux 2.6 next quarter. |
Thanks, @matheuscscp! We tried to prepare the PRs in time, but daily business got in the way. Given that, we'll prepare them with the 2.6 release in mind. |
When a resource is suspended, the event log of the CR gives no hint. This can be confusing.
The event log of an example kustomization:
The corresponding log of the controller:
The controller does inform about the kustomization being suspended, but the event log does not.
I would expect the info about the resource being suspended to also be shown in the event log.
I am aware that the info is present in the status of the resource, but when just looking at the event log and seeing
Reconciliation finished
feels misleading to me.The text was updated successfully, but these errors were encountered: