-
Notifications
You must be signed in to change notification settings - Fork 15
/
install-loki.sh
executable file
·26 lines (19 loc) · 1.01 KB
/
install-loki.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
. functions.sh
export LOKI_STORAGE=$(config_val "loki.storage")
export LOKI_USERNAME=$(config_val "loki.username")
export LOKI_PASSWORD=$(config_val "loki.password")
export LOKI_DOMAIN="loki.$(config_val 'baseDomain')"
export LOKI_RETENTION=$(config_val "loki.retention")
envsubst < value-files/loki.yaml > value-files/loki.rendered.yaml
if [[ "$(config_val 'baseDomain')" == "" ]]; then
helm upgrade --install loki grafana/loki --version $(config_val "loki.version") --namespace logging --create-namespace --values value-files/loki.rendered.yaml \
--set gateway.ingress.enabled=false \
--set gateway.service.type=NodePort \
--set gateway.service.nodePort=$(config_val "loki.exposedPort")
else
helm upgrade --install loki grafana/loki --version $(config_val "loki.version") --namespace logging --create-namespace --values value-files/loki.rendered.yaml
fi
wait_for_resource_rollout statefulset loki logging
wait_for_resource_rollout deployment loki-gateway logging
rm -rf value-files/loki.rendered.yaml