Files
homelab-v/k8s/infra/auth/lldap/bootstrap.yaml
T
Vegard Hagen 1fbe9fb6bd feat(auth): add custom user properties for audiobookshelf
Add custom user schema in LLDAP which maps to a custom attribute in
Authelia which we then again map to a custom claim which we include in a
custom scope which audiobookshelf requests

Signed-off-by: Vegard Hagen <[email protected]>
2025-05-03 19:15:27 +02:00

80 lines
2.3 KiB
YAML

apiVersion: batch/v1
kind: Job
metadata:
name: lldap-bootstrap
namespace: lldap
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: BeforeHookCreation
spec:
template:
spec:
restartPolicy: OnFailure
securityContext:
runAsNonRoot: true
runAsUser: 1001
runAsGroup: 1001
fsGroup: 1001
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
containers:
- name: lldap-bootstrap
image: ghcr.io/lldap/lldap:v0.6.1-alpine-rootless # renovate: docker=ghcr.io/lldap/lldap
command: [ /app/bootstrap.sh ]
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: [ ALL ]
envFrom:
- configMapRef:
name: common-env
- configMapRef:
name: bootstrap-env
env:
- name: LLDAP_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: lldap-credentials
key: LLDAP_LDAP_USER_PASS
volumeMounts:
- name: tmp
mountPath: /tmp
- name: groups
mountPath: /bootstrap/group-configs
readOnly: true
- name: user-schemas
mountPath: /bootstrap/user-schemas
readOnly: true
- name: users
mountPath: /bootstrap/user-configs
readOnly: true
volumes:
- name: tmp
emptyDir: { }
- name: groups
projected:
sources:
- secret:
name: lldap-config
items:
- key: groups.json
path: groups.json
- name: user-schemas
projected:
sources:
- secret:
name: lldap-config
items:
- key: user-schemas.json
path: user-schemas.json
- name: users
projected:
sources:
- secret:
name: lldap-config
items:
- key: users.json
path: users.json