Merge pull request #1445 from andrein/add_grafana_ldap
Add grafana ldap support (take 2)
This commit is contained in:
36
examples/grafana-ldap.jsonnet
Normal file
36
examples/grafana-ldap.jsonnet
Normal file
@@ -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) }
|
||||||
@@ -27,6 +27,7 @@ local defaults = {
|
|||||||
containers: [],
|
containers: [],
|
||||||
datasources: [],
|
datasources: [],
|
||||||
config: {},
|
config: {},
|
||||||
|
ldap: null,
|
||||||
plugins: [],
|
plugins: [],
|
||||||
env: [],
|
env: [],
|
||||||
};
|
};
|
||||||
@@ -57,6 +58,7 @@ function(params) {
|
|||||||
folderDashboards: g._config.folderDashboards,
|
folderDashboards: g._config.folderDashboards,
|
||||||
containers: g._config.containers,
|
containers: g._config.containers,
|
||||||
config+: g._config.config,
|
config+: g._config.config,
|
||||||
|
ldap: g._config.ldap,
|
||||||
plugins+: g._config.plugins,
|
plugins+: g._config.plugins,
|
||||||
env: g._config.env,
|
env: g._config.env,
|
||||||
} + (
|
} + (
|
||||||
|
|||||||
Reference in New Issue
Block a user