Skip to content

Commit

Permalink
Create ldap configmap example
Browse files Browse the repository at this point in the history
  • Loading branch information
kcepaxe committed Jan 17, 2024
1 parent 80f0789 commit 93c1e01
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/ldap/README.md
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" >}}
64 changes: 64 additions & 0 deletions examples/ldap/resources.yaml
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"

Check failure on line 15 in examples/ldap/resources.yaml

View workflow job for this annotation

GitHub Actions / file-checks

[trailing whitespace] reported by reviewdog 🐶 bind_dn = "user@grafana.org" Raw Output: examples/ldap/resources.yaml:15: 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

0 comments on commit 93c1e01

Please sign in to comment.