-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "LDAP configmap auth" | ||
linkTitle: "LDAP configmap auth" | ||
--- | ||
|
||
A basic example of a Grafana Deployment with LDAP integration. The LDAP integration in Grafana allows your Grafana users to login with their LDAP credentials | ||
For cusomize you ldap-config configmap read [this](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/ldap/) | ||
|
||
{{< readfile file="resources.yaml" code="true" lang="yaml" >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: ldap-config | ||
data: | ||
ldap.toml: | | ||
verbose_logging = true | ||
[[servers]] | ||
host = "ldap.grafana.org" | ||
port = 389 | ||
use_ssl = true | ||
start_tls = false | ||
ssl_skip_verify = true | ||
bind_dn = "user@grafana.org" | ||
bind_password = 'user_password123' | ||
search_filter = "(sAMAccountName=%s)" | ||
search_base_dns = ["DC=grafana,DC=org"] | ||
[servers.attributes] | ||
name = "givenName" | ||
surname = "sn" | ||
username = "sAMAccountName" | ||
member_of = "memberOf" | ||
email = "mail" | ||
[[servers.group_mappings]] | ||
group_dn = "cn=superadmins,dc=grafana,dc=org" | ||
org_role = "Admin" | ||
grafana_admin = true | ||
[[servers.group_mappings]] | ||
group_dn = "cn=users,dc=grafana,dc=org" | ||
org_role = "Editor" | ||
[[servers.group_mappings]] | ||
group_dn = "*" | ||
org_role = "Viewer" | ||
--- | ||
apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: Grafana | ||
metadata: | ||
name: grafana | ||
labels: | ||
dashboards: "grafana" | ||
spec: | ||
config: | ||
log: | ||
mode: "console" | ||
auth: | ||
disable_login_form: "false" | ||
auth.ldap: | ||
enabled: "true" | ||
config_file: /etc/grafana-configmaps/ldap.toml | ||
deployment: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: grafana | ||
volumeMounts: | ||
- mountPath: /etc/grafana-configmaps | ||
name: grafana-configmaps | ||
readOnly: false | ||
volumes: | ||
- name: grafana-configmaps | ||
configMap: | ||
name: ldap-config |