Skip to content

Conversation

@ankitshokeen
Copy link

@ankitshokeen ankitshokeen commented Oct 27, 2025

#7748

The Loki Operator defaulted to /tmp/rules for rule storage — a non-persistent path that loses data on pod restart. Production deployments using the official Helm chart expect /var/lib/loki/rules.

  • Only modifies operator/internal/manifests/var.go
  • Sets persistent default storage paths:
    walDirectory          = "/var/lib/loki/wal"
    dataDirectory         = "/var/lib/loki"
    rulesStorageDirectory = "/var/lib/loki/rules"

@CLAassistant
Copy link

CLAassistant commented Oct 27, 2025

CLA assistant check
All committers have signed the CLA.

@xperimental
Copy link
Collaborator

I will probably take a look at this next week. Currently I'm a bit confused on what it tries to do, the linked issue seems to indicate a bit of a misunderstanding, but we'll get to the bottom of this.

General note: If the PR should fix something that is related to the operator then the changes should be limited to the operator/ directory.

@ankitshokeen ankitshokeen force-pushed the fix/default-data-location-7748 branch from 9cb597e to 53b007e Compare November 1, 2025 20:13
@pull-request-size pull-request-size bot added size/XS and removed size/S labels Nov 1, 2025
@ankitshokeen
Copy link
Author

I will probably take a look at this next week. Currently I'm a bit confused on what it tries to do, the linked issue seems to indicate a bit of a misunderstanding, but we'll get to the bottom of this.

General note: If the PR should fix something that is related to the operator then the changes should be limited to the operator/ directory.

Thank you for the feedback! The PR now touches only operator/internal/manifests/var.go .
Verified with Kind: loki-ruler mounts /var/lib/loki/rules by default.
Ready for your review please let me know if anything else is needed!

Updated example configuration files to use /var/lib/loki instead of /tmp/loki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants