Skip to content

Commit

Permalink
[loki microservices]: allow custom gateway server configuration (#6138)
Browse files Browse the repository at this point in the history
* feat(loki)!: allow custom server configuration

Signed-off-by: irizzant <i.rizzante@gmail.com>

* doc(loki): fix documentation

* refactor: move server_snippet under gateway.libsonnet

Signed-off-by: irizzant <i.rizzante@gmail.com>
  • Loading branch information
irizzant authored May 19, 2022
1 parent e5eff96 commit bb2eccc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions production/ksonnet/loki/gateway.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ local k = import 'ksonnet-util/kausal.libsonnet';
{
_config+:: {
htpasswd_contents: error 'must specify htpasswd contents',

// This is inserted into the gateway Nginx config file
// under the server directive
gateway_server_snippet: '',
},

_images+:: {
Expand Down Expand Up @@ -74,6 +78,8 @@ local k = import 'ksonnet-util/kausal.libsonnet';
location ~ /loki/api/.* {
proxy_pass http://query-frontend.%(namespace)s.svc.cluster.local:%(http_listen_port)s$request_uri;
}
%(gateway_server_snippet)s
}
}
||| % $._config,
Expand Down

0 comments on commit bb2eccc

Please sign in to comment.