Add OpenLDAP (#670)

* add initial work on openldap

* fix indent

* use latest common version

* remove remaining nextcloud components...

* disable ldap tls for now

* correct common version

* bump common version used to fix some issues

* some slight OpenLDAP tweaks
This commit is contained in:
Kjeld Schouten-Lebbing
2021-07-06 15:57:15 +02:00
committed by GitHub
parent 5b39389894
commit d6933350e9
10 changed files with 1345 additions and 0 deletions
@@ -0,0 +1,21 @@
{{/* Define the configmap */}}
{{- define "openldap.configmap" -}}
---
apiVersion: v1
kind: ConfigMap
metadata:
name: openldapconfig
data:
LDAP_TLS_CRT_FILENAME: "tls.crt"
LDAP_TLS_KEY_FILENAME: "tls.key"
LDAP_TLS_DH_PARAM_FILENAME: "dhparam.pem"
LDAP_TLS_CA_CRT_FILENAME: "ca.crt"
{{- if .Values.replication.enabled }}
LDAP_REPLICATION: "true"
LDAP_REPLICATION_CONFIG_SYNCPROV: "binddn=\"cn=admin,cn=config\" bindmethod=simple credentials=$LDAP_CONFIG_PASSWORD searchbase=\"cn=config\" type=refreshAndPersist retry=\"{{.Values.replication.retry }} +\" timeout={{.Values.replication.timeout }} starttls={{.Values.replication.starttls }} tls_reqcert={{.Values.replication.tls_reqcert }}"
LDAP_REPLICATION_DB_SYNCPROV: "binddn=\"cn=admin,$LDAP_BASE_DN\" bindmethod=simple credentials=$LDAP_ADMIN_PASSWORD searchbase=\"$LDAP_BASE_DN\" type=refreshAndPersist interval={{.Values.replication.interval }} retry=\"{{.Values.replication.retry }} +\" timeout={{.Values.replication.timeout }} starttls={{.Values.replication.starttls }} tls_reqcert={{.Values.replication.tls_reqcert }}"
LDAP_REPLICATION_HOSTS: "#PYTHON2BASH:[{{ template "replicalist" . }}]"
{{- end }}
{{- end -}}
@@ -0,0 +1,8 @@
{{/* Make sure all variables are set properly */}}
{{- include "common.values.setup" . }}
{{/* Render the templates */}}
{{ include "common.all" . }}
{{/* Render configmap for openldap */}}
{{- include "openldap.configmap" . }}