-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
operator: Add warning for old schema configuration #11158
Conversation
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.
In general this PR goes into the right direction. A couple of suggestions for better UX:
- Keep the Warning condition that the user should upgrade to V13 if not done.
- Add another Warning condition that indicates that some schemas are off the retention limit.
- Move
SchemaStatus
into theObjectStorageSchema
struct to indicate which schemas are off the the retention limit. - Add a custom metric that collects Loki stacks requiring a schema upgrade (i.e.
lokistack_schema_upgrades_required
). We can even write and deploy a custom alert for this: https://github.com/grafana/loki/blob/main/operator/internal/manifests/internal/alerts/prometheus-alerts.yaml)
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.
Overall a good start 👍
I have not tested this on a cluster yet, only looked at the source so far, but I added some comments already.
I second Peri's hint for an alert. I'm currently assuming that this is how the "insights" feature works in OpenShift.
Trivy scan found the following vulnerabilities:
|
947d153
to
3e7382c
Compare
operator/CHANGELOG.md
Outdated
@@ -1,5 +1,6 @@ | |||
## Main | |||
|
|||
- [11158](https://github.com/grafana/loki/pull/11158) **btaani**: operator: Add support to add additional storage schema V13 |
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.
I think the feature we're adding is the warning nudging the user to upgrade the schema:
- [11158](https://github.com/grafana/loki/pull/11158) **btaani**: operator: Add support to add additional storage schema V13 | |
- [11158](https://github.com/grafana/loki/pull/11158) **btaani**: operator: Add warning for old schema configuration |
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 new warning works nicely 👍
I left a few comments in the PR. I'll defer to @periklis for another pass.
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.
LGTM and smoke testing working fine too. A couple of nits and one remaining question about removed tests.
Co-authored-by: Periklis Tsirakidis <[email protected]>
Co-authored-by: Periklis Tsirakidis <[email protected]>
Co-authored-by: Robert Jacob <[email protected]> Co-authored-by: Periklis Tsirakidis <[email protected]>
What this PR does / why we need it:
This PR adds a new warning condition to the LokiStack in case the object storage schema version is older than V13
Which issue(s) this PR fixes:
Fixes LOG-4548
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updatedadd-to-release-notes
labeldocs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR