loki
loki copied to clipboard
Fix PVC in loki helm
The lacking apiVersion and kind attributes make ArgoCD go into an endless loop
What this PR does / why we need it:
The PVC lacks attributes which are applied by Kubernetes; however, this leaves ArgoCD in a loop because the attributes are different.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
- [ ] Reviewed the
CONTRIBUTING.mdguide (required) - [ ] Documentation added
- [ ] Tests updated
- [ ] Title matches the required conventional commits format, see here
- Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such,
featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
- Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such,
- [ ] Changes that require user attention or interaction to upgrade are documented in
docs/sources/setup/upgrade/_index.md - [ ] For Helm chart changes bump the Helm chart version in
production/helm/loki/Chart.yamland updateproduction/helm/loki/CHANGELOG.mdandproduction/helm/loki/README.md. Example PR - [ ] If the change is deprecating or removing a configuration option, update the
deprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR
This is the diff that ArgoCD detects when I use PVCs for the loki-chunks-cache StatefulSet - it tries to prune the fields that ArgoCD generates from the helm chart.
The only workaround I've found is to use the following stanza in my Application manifest for ArgoCD, ignoring those fields:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: observability
namespace: argocd
spec:
project: ...
ignoreDifferences:
- group: apps
kind: StatefulSet
name: observability-loki-chunks-cache
jqPathExpressions:
- .spec.volumeClaimTemplates[].apiVersion
- .spec.volumeClaimTemplates[].kind
sources:
- repoURL: https://grafana.github.io/helm-charts
chart: loki
targetRevision: 6.12.0
The persistence is enabled for the loki-chunks-cache by selecting the storage class in the values.yml file
chunksCache:
# Persistence settings for the chunks-cache
persistence:
enabled: true # TODO: Endless loop
storageClass: nfs-client
Hi @chaudum, I confirmed that al the persistent volume claims required by loki components appear to have this issue, so I currently have to add the ignoreDifferences block for each StatefulSet deployed via helm. For the singleBinarry installation with caching enabled, this requires the initial loki volume, as well as volumes for the chunks-cache and results-cache
https://github.com/grafana/loki/pull/15192 should have fixed it.
Yes, this can be closed now.
Closing, fixed via https://github.com/grafana/loki/pull/15192. Thank you for taking the time to contribute to the Loki project.