Skip to content

Commit

Permalink
Merge pull request #1448 from andrein/cherry-pick-1445
Browse files Browse the repository at this point in the history
Cherry-pick grafana LDAP into release-0.9
  • Loading branch information
paulfantom committed Oct 20, 2021
2 parents b6ab321 + 822f885 commit 864ca1e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
36 changes: 36 additions & 0 deletions examples/grafana-ldap.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
common+: {
namespace: 'monitoring',
},
grafana+: {
config+: {
sections: {
'auth.ldap': {
enabled: true,
config_file: '/etc/grafana/ldap.toml',
allow_sign_up: true,
},
},
},
ldap: |||
[[servers]]
host = "127.0.0.1"
port = 389
use_ssl = false
start_tls = false
ssl_skip_verify = false
bind_dn = "cn=admins,dc=example,dc=com"
bind_password = 'grafana'
search_filter = "(cn=%s)"
search_base_dns = ["dc=example,dc=com"]
|||,
},
},
};

{ ['grafana-' + name]: kp.grafana[name] for name in std.objectFields(kp.grafana) }
2 changes: 2 additions & 0 deletions jsonnet/kube-prometheus/components/grafana.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ local defaults = {
containers: [],
datasources: [],
config: {},
ldap: null,
plugins: [],
env: [],
};
Expand Down Expand Up @@ -57,6 +58,7 @@ function(params) {
folderDashboards: g._config.folderDashboards,
containers: g._config.containers,
config+: g._config.config,
ldap: g._config.ldap,
plugins+: g._config.plugins,
env: g._config.env,
} + (
Expand Down

0 comments on commit 864ca1e

Please sign in to comment.