Skip to content

Commit 882484d

Browse files
committed
add grafana ldap example
1 parent ce7007c commit 882484d

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

examples/grafana-ldap.jsonnet

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
local kp =
2+
(import 'kube-prometheus/main.libsonnet') +
3+
{
4+
values+:: {
5+
common+: {
6+
namespace: 'monitoring',
7+
},
8+
grafana+: {
9+
config+: {
10+
sections: {
11+
'auth.ldap': {
12+
enabled: true,
13+
config_file: '/etc/grafana/ldap.toml',
14+
allow_sign_up: true,
15+
},
16+
},
17+
},
18+
ldap: |||
19+
[[servers]]
20+
host = "127.0.0.1"
21+
port = 389
22+
use_ssl = false
23+
start_tls = false
24+
ssl_skip_verify = false
25+
26+
bind_dn = "cn=admins,dc=example,dc=com"
27+
bind_password = 'grafana'
28+
29+
search_filter = "(cn=%s)"
30+
search_base_dns = ["dc=example,dc=com"]
31+
|||,
32+
},
33+
},
34+
};
35+
36+
{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }

0 commit comments

Comments
 (0)