canonical / openldap-k8s-operator

openldap-k8s-operator - charm repository.
GNU General Public License v3.0
0 stars 3 forks source link

Allow for configuring LDAP via config settings #7

Open merkata opened 2 years ago

merkata commented 2 years ago

Currently the charm lets you configure the listen port for OpenLDAP (that is also used for probes in Pebble and k8s). The config needs to allow setting a new domain at least, to overwrite the default one of example, which doesn't seem very usable.

merkata commented 2 years ago

The config settings of the charm need to be extended to allow modification of the slapd.conf file that OpenLDAP uses. Right now, if you deploy the charm, you cannot alter the configuration via juju config openldap-k8s domain-name="mydomain.com" for instance. The config needs to be available as ENV variables ( much like it is done in https://github.com/bitnami/containers/tree/main/bitnami/openldap ) and upon change, OpenLDAP needs to pick them up from the file. It is to be researched what happens when you change settings, how is this reflected in OpenLDAP and the backend store (PostgreSQL in our case). The expected outcome needs to be noted and available as an integration test. See additional information on passing configurations to LDAP in https://github.com/bitnami/containers/blob/main/bitnami/openldap/2.6/debian-11/rootfs/opt/bitnami/scripts/libopenldap.sh