jp-gouin / helm-openldap

Helm chart of Openldap in High availability with multi-master replication and PhpLdapAdmin and Ltb-Passwd
Apache License 2.0
181 stars 115 forks source link

The `replication.enabled` value seems to have no effect #135

Closed brainplot closed 6 months ago

brainplot commented 6 months ago

Describe the bug I'm trying to deploy this chart in a local test environment, where I don't need HA. From my understanding, the replication.enabled value should control whether the openldap instances are replicated or not. However, even if I set it to false, I still see 3 replicas being created.

To Reproduce Just a simple default installation will show this. It happens when I run the following command:

helm install -n openldap-test --create-namespace openldap openldap/openldap-stack-ha \
--set replication.enabled=false --wait

Expected behavior I would expect the above command to create only one replica.

Screenshots Not a screenshot but these are the resources that kubectl get all -n openldap-test shows after running that command:

NAME                                         READY   STATUS     RESTARTS   AGE
pod/openldap-0                               1/1     Running    0          7m43s
pod/openldap-1                               1/1     Running    0          6m57s
pod/openldap-2                               0/1     Init:0/1   0          6m11s
pod/openldap-ltb-passwd-67f7b6c85c-v4r9d     1/1     Running    0          7m43s
pod/openldap-phpldapadmin-685fc7c86d-zw7r5   1/1     Running    0          7m43s

NAME                            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)           AGE
service/openldap                ClusterIP   10.101.191.68   <none>        389/TCP,636/TCP   7m43s
service/openldap-headless       ClusterIP   None            <none>        389/TCP           7m43s
service/openldap-ltb-passwd     ClusterIP   10.97.45.247    <none>        80/TCP            7m43s
service/openldap-phpldapadmin   ClusterIP   10.99.191.193   <none>        80/TCP            7m43s

NAME                                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/openldap-ltb-passwd     1/1     1            1           7m43s
deployment.apps/openldap-phpldapadmin   1/1     1            1           7m43s

NAME                                               DESIRED   CURRENT   READY   AGE
replicaset.apps/openldap-ltb-passwd-67f7b6c85c     1         1         1       7m43s
replicaset.apps/openldap-phpldapadmin-685fc7c86d   1         1         1       7m43s

NAME                        READY   AGE
statefulset.apps/openldap   2/3     7m43s

Additional context

jp-gouin commented 6 months ago

Hi @brainplot, replication.enabled is not correlated to replicaCount. By setting replication.enabled to false you disable the following scheme syncprov,serverid,csyncprov,rep,bsyncprov,brep and thus disable the replication between all instances.

brainplot commented 6 months ago

Hi @jp-gouin, thanks for your reply. I'm sorry. I'm not too familiar with the LDAP protocol. I'll close this :)