-
Notifications
You must be signed in to change notification settings - Fork 37
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
Refactor observability controller #1178
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1178 +/- ##
==========================================
+ Coverage 83.38% 83.91% +0.53%
==========================================
Files 82 82
Lines 7120 7388 +268
==========================================
+ Hits 5937 6200 +263
- Misses 949 952 +3
- Partials 234 236 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
r.createMonitor(ctx, monitorObjs, kOpMonitorSpec, observability.ServiceMonitorsResource, logger) | ||
kOpMonitor := kOpMonitorBuild(r.namespace) | ||
err := r.createServiceMonitor(ctx, kOpMonitor, logger) | ||
if err != nil { |
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.
The errors are deliberately only logged, not propagated up the stack, to allow other monitors to possibly be still created.
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.
Ok, I will leave as it is then. However, if there is a net issue or API server downtime issue, the operator would not retry until there is another event 🤷
There is an issue with the hardcoded namespaces of istio and envoygateway. The namespace of those control planes cannot be assumed to be those hardcoded. I will address this issue in a follow up PR |
There is an issue with the lifecycle of the monitors when a gateway is deleted. The monitoring resource does not get deleted. I will address this issue in a follow up PR |
686b416
to
91df7cc
Compare
Signed-off-by: Eguzki Astiz Lezaun <[email protected]>
91df7cc
to
2c43a4f
Compare
@eguzki is that an exist issue? |
@Boomatang, I created the follow-up issues below. They seem like good first issues that I could get started with, @eguzki could we sync on these when you're back? |
Yes, those are good first issues. Send invite and we sync. |
The verification steps were successful. Turning the observability option on and off created and deleted the monitoring resources as expected. /lgtm |
kindly asking for review @david-martin @Patryk-Stefanski |
What
Following up the work being done in #1164. Refactor to, hopefully, simplify the code to maintain.
createOnly
mutator, having the same functionality: resources can externally be updated and the operator will not revert the changes back.Added error handling. When resource creation reports error, the error is being returned and propagated up in the stack.Verification steps
kubectl wait --timeout=300s --for=condition=Ready kuadrant kuadrant-sample -n kuadrant-system
The expected result:
Filtering by labels
kuadrant-observability=true
should give the same output.kubectl patch kuadrant kuadrant-sample --type=merge --patch '{"spec": {"observability": null}}' -n kuadrant-system
The expected result: