-
Notifications
You must be signed in to change notification settings - Fork 5
feat: switch loki deployment to loki3 chart #746
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?
Changes from 3 commits
75f378c
7c9d5f3
d9b04a8
3b7c5a8
dd1a6d7
e22d4c4
e0bc56e
fc582ff
85551ca
0d26430
3c07a5a
a36596b
38e070d
1795d30
ea72c56
a4376aa
4a870da
579534f
5014da1
c4e195f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -158,7 +158,7 @@ templates: | |
| version: {{ .Values | get "kube-prometheus-stack" | get "chartVersion" }} | ||
| {{- end }} | ||
| {{- if (not (or ( .Values | get "kube-prometheus-stack" dict | get "chartVersion" false ) ( .Values | get "kube-prometheus-stack" dict | get "chartUrl" false ) )) }} | ||
| version: "60.3.0" | ||
| version: "62.3.0" | ||
| {{- end }} | ||
| disableValidationOnInstall: true | ||
|
|
||
|
|
@@ -181,15 +181,15 @@ templates: | |
| {{- if ( .Values | get "loki" dict | get "chartUrl" false ) }} | ||
| chart: {{ .Values | get "loki" | get "chartUrl" }} | ||
| {{- else }} | ||
| chart: "grafana/loki-distributed" | ||
| chart: "grafana/loki" | ||
| {{- end }} | ||
| inherit: | ||
| - template: "defaults" | ||
| {{- if ( .Values | get "loki" dict | get "chartVersion" false ) }} | ||
| version: {{ .Values | get "loki" | get "chartVersion" }} | ||
| {{- end }} | ||
| {{- if (not (or ( .Values | get "loki" dict | get "chartVersion" false ) ( .Values | get "loki" dict | get "chartUrl" false ) )) }} | ||
| version: "0.79.0" | ||
| version: "6.10.1" | ||
| {{- end }} | ||
|
Comment on lines
+184
to
193
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainSwitch to grafana/loki v6.36.1 (Loki 3.x) — verify values migration from loki-distributed Moving from grafana/loki-distributed to grafana/loki (v6.x) is the correct path for Loki 3.x, but it comes with values/schema differences. Ensure:
Run this script to spot lingering references and potential old chart-specific structures: If you’d like, I can help propose a minimal values migration template tailored to your deployment mode. 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Searching for old chart references..."
rg -nP -C2 '\bloki-distributed\b|grafana/loki-distributed' || true
echo
echo "Sampling loki values files for potentially legacy component keys (distributor/ingester/querier/query-frontend/index-gateway/gateway):"
fd -t f -a '.*loki.*\.(ya?ml|gotmpl)$' | while read -r f; do
hits=$(rg -nP '\b(distributor|ingester|querier|query-frontend|index-?gateway|write|read|gateway)\b\s*:' -n "$f" || true)
if [ -n "$hits" ]; then
echo "---- $f"
echo "$hits" | sed -n '1,20p'
fi
doneLength of output: 1241 Align component-specific values in values/loki.yaml with grafana/loki v6.36.1 schema The search confirms there are no lingering • Lines 17, 21, 36, 38, 46, 67, 69 in Please migrate or remove these under the new chart’s top-level keys (e.g. If you’d like a minimal migration template tailored to your deployment mode, let me know—I’m happy to help. |
||
|
|
||
| promtail: | ||
|
|
@@ -204,7 +204,7 @@ templates: | |
| version: {{ .Values | get "promtail" | get "chartVersion" }} | ||
| {{- end }} | ||
| {{- if (not (or ( .Values | get "promtail" dict | get "chartVersion" false ) ( .Values | get "promtail" dict | get "chartUrl" false ) )) }} | ||
| version: "6.16.0" | ||
| version: "6.16.5" | ||
| {{- end }} | ||
|
|
||
| releases: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,73 @@ | ||
| ingester: | ||
| persistence: | ||
| enabled: true # change to true to enable | ||
| claims: | ||
| - name: data | ||
| size: 20Gi | ||
| storageClass: openebs-rawfile-localpv # change if not using openebs-rawfile-localpv | ||
|
|
||
| loki: | ||
| auth_enabled: false | ||
| extraArgs: | ||
| - -config.expand-env=true | ||
| schemaConfig: | ||
| configs: | ||
| - from: 2022-01-01 | ||
| store: boltdb-shipper | ||
| object_store: filesystem | ||
| schema: v11 | ||
| - from: 2024-04-01 | ||
| store: tsdb | ||
| object_store: s3 | ||
| schema: v13 | ||
| index: | ||
| prefix: loki_index_ | ||
| period: 24h | ||
| storageConfig: | ||
| boltdb_shipper: | ||
| shared_store: filesystem | ||
| active_index_directory: /var/loki/index | ||
| cache_location: /var/loki/cache | ||
| cache_ttl: 168h | ||
| filesystem: | ||
| directory: /var/loki/chunks | ||
| ingester: | ||
| chunk_encoding: snappy | ||
| tracing: | ||
| enabled: true | ||
| querier: | ||
| # Default is 4, if you have enough memory and CPU you can increase, reduce if OOMing | ||
| max_concurrent: 4 | ||
|
|
||
| #gateway: | ||
| # ingress: | ||
| # enabled: true | ||
| # hosts: | ||
| # - host: FIXME | ||
| # paths: | ||
| # - path: / | ||
| # pathType: Prefix | ||
|
|
||
| deploymentMode: Distributed | ||
|
|
||
| ingester: | ||
| replicas: 3 | ||
| querier: | ||
| replicas: 3 | ||
| maxUnavailable: 2 | ||
| queryFrontend: | ||
| replicas: 2 | ||
| maxUnavailable: 1 | ||
| queryScheduler: | ||
| replicas: 2 | ||
| distributor: | ||
| replicas: 3 | ||
| maxUnavailable: 2 | ||
| compactor: | ||
| replicas: 1 | ||
| indexGateway: | ||
| replicas: 2 | ||
| maxUnavailable: 1 | ||
|
|
||
| bloomCompactor: | ||
| replicas: 0 | ||
| bloomGateway: | ||
| replicas: 0 | ||
|
|
||
| # Enable minio for storage | ||
| minio: | ||
| enabled: true | ||
|
|
||
| # Zero out replica counts of other deployment modes | ||
| backend: | ||
| replicas: 0 | ||
| read: | ||
| replicas: 0 | ||
| write: | ||
| replicas: 0 | ||
|
|
||
| singleBinary: | ||
| replicas: 0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| config: | ||
| lokiAddress: http://loki-loki-distributed-gateway/loki/api/v1/push | ||
| lokiAddress: http://loki-gateway/loki/api/v1/push | ||
| clients: | ||
| - url: http://loki-loki-distributed-gateway/loki/api/v1/push | ||
| - url: http://loki-gateway/loki/api/v1/push | ||
| containerSecurityContext: | ||
| privileged: true | ||
| allowPrivilegeEscalation: true |
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.
💡 Verification agent
🧩 Analysis chain
Loki: chart switch to grafana/loki 6.36.1 — verify values migration
The rename/version bump is correct for Loki 3.x, but the values schema differs from
loki-distributed. Ensure your values no longer rely on legacy component blocks (distributor/ingester/querier/query-frontend/index-gateway/read/write/gateway) and are aligned with the new top-level keys (deploymentMode,storageConfig,schemaConfig,ruler,compactor,gateway, etc.).Run this repo-local scan to catch lingering legacy keys:
Also applies to: 192-193
🏁 Script executed:
Length of output: 1078
Loki values migration required: remove legacy component blocks
Our scan shows that your
monitoring/values/loki.yamlstill includes legacy component keys that aren’t supported by the new grafana/loki 6.36.1 chart. You’ll need to replace them with the new top-level schema (e.g.deploymentMode,storageConfig,schemaConfig,compactor,gateway,ruler, etc.).Affected file and lines:
ingester:querier:#gateway:ingester:querier:distributor:read:write:Action items:
distributor,ingester,querier,query-frontend,index-gateway,read,write,gateway) from your values.helmfile.yamlat lines 184–185 and 192–193) reference these legacy sections.Please update the values files accordingly to avoid runtime errors after the chart bump.
🤖 Prompt for AI Agents