-
Notifications
You must be signed in to change notification settings - Fork 22
NETOBSERV-2402 : Add LokiStack operator status integration #1122
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Integrate with LokiStack operator to use its status conditions instead of querying the Loki status endpoint. This adds support for detecting Loki readiness through the operator's status API when available. Changes: - Add github.com/grafana/loki/operator/apis/loki dependency - Add LokiStackStatus field to Loki config - Check operator status in getLokiStatus before querying status URL - Prevent status URL usage when using Loki operator
43f2e6c to
01cb822
Compare
|
/retest |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1122 +/- ##
==========================================
- Coverage 53.60% 53.52% -0.09%
==========================================
Files 205 205
Lines 10500 10514 +14
Branches 1296 1296
==========================================
- Hits 5629 5628 -1
- Misses 4357 4371 +14
- Partials 514 515 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
| if h.Cfg.Loki.Status != nil { | ||
| for _, conditions := range h.Cfg.Loki.Status.Conditions { | ||
| if conditions.Reason == "ReadyComponents" { | ||
| if conditions.Status == "True" { | ||
| return []byte("ready"), 200, nil | ||
| } | ||
| break | ||
| } | ||
| } | ||
| return []byte("pending"), 400, 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.
On second thought, I think that would be something to do on the operator side, rather than here. One of the reason is, by embedding the whole Loki Status in the console config, we make it very dependent on any status change, even if we don't care about that change (which if I'm correct generates a plugin restart)
Having a first-pass done on the operator, to extract what we want, would avoid that.
Description
Integrate with LokiStack operator to use its status conditions instead of querying the Loki status endpoint. This adds
support for detecting Loki readiness through the operator's status API when available.
Changes:
Dependencies
The associated operator PR
Checklist
If you are not familiar with our processes or don't know what to answer in the list below, let us know in a comment: the maintainers will take care of that.