Skip to content

Commit c153795

Browse files
committed
(fleet/kube-prometheus-stack) add ldap auth to pillan
1 parent 09bc034 commit c153795

File tree

4 files changed

+89
-11
lines changed

4 files changed

+89
-11
lines changed

fleet/lib/kube-prometheus-stack-pre/fleet.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,14 @@ dependsOn:
1212
- selector:
1313
matchLabels:
1414
bundle: external-secrets
15+
targetCustomizations:
16+
- name: pillan
17+
clusterSelector:
18+
matchExpressions:
19+
- key: management.cattle.io/cluster-display-name
20+
operator: In
21+
values:
22+
- pillan
23+
yaml:
24+
overlays:
25+
- ldap
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
apiVersion: external-secrets.io/v1beta1
3+
kind: ExternalSecret
4+
metadata:
5+
name: grafana-ldap
6+
spec:
7+
secretStoreRef:
8+
kind: ClusterSecretStore
9+
name: onepassword
10+
target:
11+
template:
12+
data:
13+
ldap-toml: |
14+
[[servers]]
15+
host = "{{ .servers }}"
16+
port = 636
17+
use_ssl = true
18+
start_tls = false
19+
ssl_skip_verify = true
20+
bind_dn = "uid={{ .username }},cn=users,cn=accounts,dc=lsst,dc=cloud"
21+
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
22+
bind_password = """{{ .password }}"""
23+
# Timeout in seconds. Applies to each host specified in the 'host' entry (space separated).
24+
timeout = 10
25+
26+
# User search filter, for example "(cn=%s)" or "(sAMAccountName=%s)" or "(uid=%s)"
27+
# Allow login from email or username, example "(|(sAMAccountName=%s)(userPrincipalName=%s))"
28+
search_filter = "(uid=%s)"
29+
30+
# An array of base dns to search through
31+
search_base_dns = ["cn=users,cn=accounts,dc=lsst,dc=cloud"]
32+
33+
# group_search_filter = "(&(objectClass=posixGroup)(memberUid=%s))"
34+
# group_search_filter_user_attribute = "distinguishedName"
35+
# group_search_base_dns = ["ou=groups,dc=grafana,dc=org"]
36+
37+
# Specify names of the LDAP attributes your LDAP uses
38+
[servers.attributes]
39+
name = "givenName"
40+
surname = "sn"
41+
username = "cn"
42+
member_of = "memberOf"
43+
email = "email"
44+
45+
# Map ldap groups to grafana org roles
46+
[[servers.group_mappings]]
47+
group_dn = "cn=admins,cn=groups,cn=accounts,dc=lsst,dc=cloud"
48+
org_role = "Admin"
49+
50+
[[servers.group_mappings]]
51+
group_dn = "cn=k8s-pillan-admins,cn=groups,cn=accounts,dc=lsst,dc=cloud"
52+
org_role = "Editor"
53+
54+
[[servers.group_mappings]]
55+
# If you want to match all (or no ldap groups) then you can use wildcard
56+
group_dn = "cn=k8s-pillan,cn=groups,cn=accounts,dc=lsst,dc=cloud"
57+
org_role = "Viewer"
58+
data:
59+
- secretKey: username
60+
remoteRef:
61+
key: &item grafana service account
62+
property: username
63+
- secretKey: password
64+
remoteRef:
65+
key: *item
66+
property: password
67+
- secretKey: servers
68+
remoteRef:
69+
key: *item
70+
property: servers

fleet/lib/kube-prometheus-stack/overlays/pillan/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,11 @@ grafana:
126126
- secretName: tls-grafana-ingress
127127
hosts:
128128
- grafana.tu.lsst.org
129+
grafana.ini:
130+
auth.ldap:
131+
enabled: true
132+
allow_sign_up: true
133+
config_file: /etc/grafana/ldap.toml
134+
ldap:
135+
enabled: true
136+
existingSecret: grafana-ldap

fleet/lib/rook-ceph-conf/charts/kona/templates/cephobjectstoreuser-s3-loki.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)