Skip to content

Commit

Permalink
Merge pull request #1374 from cornfeedhobo/template-datasource-urls
Browse files Browse the repository at this point in the history
[loki-stack] support configurable datasource urls
  • Loading branch information
zanhsieh authored Aug 21, 2022
2 parents 5ab2331 + 0fe1bff commit bd46f96
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/loki-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: "v1"
name: loki-stack
version: 2.7.2
version: 2.8.0
appVersion: v2.6.1
kubeVersion: "^1.10.0-0"
description: "Loki: like Prometheus, but for logs."
Expand Down
10 changes: 10 additions & 0 deletions charts/loki-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,13 @@ kubectl port-forward --namespace <YOUR-NAMESPACE> service/loki-grafana 3000:80

Navigate to <http://localhost:3000> and login with `admin` and the password output above.
Then follow the [instructions for adding the loki datasource](https://grafana.com/docs/grafana/latest/datasources/loki/), using the URL `http://loki:3100/`.

## Upgrade
### Version >= 2.8.0
Provide support configurable datasource urls [#1374](https://github.com/grafana/helm-charts/pull/1374)

### Version >= 2.7.0
Update promtail dependency to ^6.2.3 [#1692](https://github.com/grafana/helm-charts/pull/1692)

### Version >=2.6.0
Bumped grafana 8.1.6->8.3.4 [#1013](https://github.com/grafana/helm-charts/pull/1013)
4 changes: 2 additions & 2 deletions charts/loki-stack/templates/datasources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data:
- name: Loki
type: loki
access: proxy
url: http://{{(include "loki.serviceName" .)}}:{{ .Values.loki.service.port }}
url: {{ tpl .Values.loki.url . | quote }}
version: 1
isDefault: {{ default false .Values.loki.isDefault }}
{{- with .Values.loki.datasource.jsonData }}
Expand All @@ -31,7 +31,7 @@ data:
- name: Prometheus
type: prometheus
access: proxy
url: http://{{ include "prometheus.fullname" .}}:{{ .Values.prometheus.server.service.servicePort }}{{ .Values.prometheus.server.prefixURL }}
url: {{ tpl .Values.prometheus.url . | quote }}
version: 1
isDefault: {{ default false .Values.prometheus.isDefault }}
{{- with .Values.prometheus.datasource.jsonData }}
Expand Down
2 changes: 2 additions & 0 deletions charts/loki-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ test_pod:
loki:
enabled: true
isDefault: true
url: http://{{(include "loki.serviceName" .)}}:{{ .Values.loki.service.port }}
readinessProbe:
httpGet:
path: /ready
Expand Down Expand Up @@ -41,6 +42,7 @@ grafana:
prometheus:
enabled: false
isDefault: false
url: http://{{ include "prometheus.fullname" .}}:{{ .Values.prometheus.server.service.servicePort }}{{ .Values.prometheus.server.prefixURL }}
datasource:
jsonData: {}

Expand Down

0 comments on commit bd46f96

Please sign in to comment.