Loki Public Datasource feature.#
Some clients need to have loki-client datasource as public in order to access it from any grafana.
To realize this use case, it is neccessary to activate loki_public_datasource feature flag in caascad-zones.
When this feature is activated, the Loki password is being generated and stored in Vault of the cloud zone and several resources are being deployed:
K8s resources :
- 1 Ingress for Loki Querier;
- 1 Secret for the Ingress;
- 1 Blackboxexporter ServiceMonitor cloud-caascad to check the
loki_public_datasourceurl. - 1 Blackboxexporter ServiceMonitor client to check the
loki_public_datasourceurl.
Enable Loki Public Datasource feature in caascad-zones.#
In order to deploy Loki Public Datasource feature, you must set loki_public_datasource feature to true for the wanted zone in caascad-zones file.
Deploy Loki Public Datasource with trackbone.#
To deploy the activated feature, you must deploy using Trackbone and bootstrap=true.
trackbone apply -z <zone-cloud> -c loki-cloud-client -t bootstrap=true
trackbone apply -z <zone-client> -c blackbox-exporter-servicemonitor-loki-query-client
You should be able to see Ingress, Secret and ServiceMonitor resources.
rswitch login <zone>
kubectl -n logging-client get ingress querier
kubectl -n logging-client get secret ingress-querier-basic-auth
kubectl -n logging-client get smon blackbox-exporter-loki-query
Regenerate Loki Public Datasource password#
If you need to regenerate loki-query password, you have to rerun the Trackbone command with bootstrap=true.
The secret will be regenerate and the password in vault cloud updated.
the password vault path: secret/applications/loki-query
trackbone apply -z <zone-cloud> -c loki-cloud-client -t bootstrap=true