Skip to content
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

feat: switch loki deployment to loki3 chart #746

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ This *Namespace* adds software for log and metrics collection and visualization,

- [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)<br>
Installs the kube-prometheus stack, a collection of Kubernetes manifests, Grafana dashboards, and Prometheus rules
- [loki](https://github.com/grafana/helm-charts/tree/main/charts/loki-distributed)<br>
- [loki](https://github.com/grafana/loki/tree/main/production/helm/loki)<br>
Helm chart for Grafana Loki in microservices mode
- [node-problem-detector](https://github.com/deliveryhero/helm-charts/tree/master/stable/node-problem-detector)<br>
This chart installs a node-problem-detector daemonset. This tool aims to make various node problems visible to the upstream layers in cluster management stack.
Expand Down
2 changes: 1 addition & 1 deletion monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This *Namespace* adds software for log and metrics collection and visualization,
## Releases
- [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack)<br>
Installs the kube-prometheus stack, a collection of Kubernetes manifests, Grafana dashboards, and Prometheus rules
- [loki](https://github.com/grafana/helm-charts/tree/main/charts/loki-distributed)<br>
- [loki](https://github.com/grafana/loki/tree/main/production/helm/loki)<br>
Helm chart for Grafana Loki in microservices mode
- [node-problem-detector](https://github.com/deliveryhero/helm-charts/tree/master/stable/node-problem-detector)<br>
This chart installs a node-problem-detector daemonset. This tool aims to make various node problems visible to the upstream layers in cluster management stack.
Expand Down
8 changes: 4 additions & 4 deletions monitoring/helmfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 }}

promtail:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion monitoring/values/kube-prometheus-stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ grafana:
- name: Loki
access: proxy
type: loki
url: http://loki-loki-distributed-gateway
url: http://loki-gateway
version: 1
sidecar:
logLevel: DEBUG
Expand Down
78 changes: 61 additions & 17 deletions monitoring/values/loki.yaml
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
4 changes: 2 additions & 2 deletions monitoring/values/promtail.yaml
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
10 changes: 5 additions & 5 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4393,7 +4393,7 @@
"url": {
"type": "string",
"enum": [
"https://github.com/grafana/helm-charts/tree/main/charts/loki-distributed"
"https://github.com/grafana/loki/tree/main/production/helm/loki"
]
},
"repository": {
Expand All @@ -4411,7 +4411,7 @@
"name": {
"type": "string",
"enum": [
"loki-distributed"
"loki"
]
}
}
Expand Down Expand Up @@ -6832,7 +6832,7 @@
"type": "object",
"required": [
"promtail",
"loki-distributed"
"loki"
],
"properties": {
"promtail": {
Expand All @@ -6856,7 +6856,7 @@
}
}
},
"loki-distributed": {
"loki": {
"type": "object",
"required": [
"url",
Expand All @@ -6866,7 +6866,7 @@
"url": {
"type": "string",
"enum": [
"https://github.com/grafana/helm-charts/tree/main/charts/loki-distributed"
"https://github.com/grafana/loki/tree/main/production/helm/loki"
]
},
"description": {
Expand Down
4 changes: 2 additions & 2 deletions src/charts.cue
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ package LaunchpadNamespaces
url: "https://github.com/grafana/helm-charts/tree/main/charts/promtail"
description: "Promtail is an agent which ships the contents of local logs to a Loki instance"
}
"loki-distributed": {
url: "https://github.com/grafana/helm-charts/tree/main/charts/loki-distributed"
"loki": {
url: "https://github.com/grafana/loki/tree/main/production/helm/loki"
description: "Helm chart for Grafana Loki in microservices mode"
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/schemas/monitoring.cue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ package LaunchpadNamespaces
chart: {_repositories["prometheus-community"].charts["kube-prometheus-stack"]}
feature: #features.#metrics
_template: {
version: "60.3.0"
version: "62.3.0"
disableValidationOnInstall: true
}
}
Expand All @@ -61,14 +61,14 @@ package LaunchpadNamespaces
_template: {version: "2.3.13"}
}
loki: {
chart: {_repositories.grafana.charts["loki-distributed"]}
chart: {_repositories.grafana.charts["loki"]}
feature: #features.#logs
_template: {version: "0.79.0"}
_template: {version: "6.10.1"}
}
promtail: {
chart: {_repositories.grafana.charts.promtail}
feature: #features.#logs
_template: {version: "6.16.0"}
_template: {version: "6.16.5"}
}
}

Expand Down