openldap

by joaquinito2051

Helm chartv1.0.0App 2.4.44

Community developed LDAP software

About this chart

OpenLDAP Helm Chart

Prerequisites Details

  • Kubernetes 1.8+
  • PV support on the underlying infrastructure

Chart Details

This chart will do the following:

  • Instantiate an instance of OpenLDAP server

Installing the Chart

To install the chart with the release name my-release:

$ helm install --name my-release <helm-repo>/openldap

$ helm install --name my-release stable/openldap

Configuration

We use the docker images provided by https://github.com/osixia/docker-openldap. The docker image is highly configurable and well documented. Please consult to documentation for the docker image for more information.

The following table lists the configurable parameters of the openldap chart and their default values.

ParameterDescriptionDefault
replicaCountNumber of replicas1
strategyDeployment strategy{}
image.repositoryContainer image repositoryosixia/openldap
image.tagContainer image tag1.1.10
image.pullPolicyContainer pull policyIfNotPresent
extraLabelsLabels to add to the Resources{}
existingSecretUse an existing secret for admin and config user passwords""
service.annotationsAnnotations to add to the service{}
service.clusterIPIP address to assign to the service""
service.externalIPsService external IP addresses[]
service.ldapPortExternal service port for LDAP389
service.loadBalancerIPIP address to assign to load balancer (if supported)""
service.loadBalancerSourceRangesList of IP CIDRs allowed access to load balancer (if supported)[]
service.sslLdapPortExternal service port for SSL+LDAP636
service.typeService typeClusterIP
envList of key value pairs as env variables to be sent to the docker image. See https://github.com/osixia/docker-openldap for available ones[see values.yaml]
tls.enabledSet to enable TLS/LDAPS - should also set tls.secretfalse
tls.secretSecret containing TLS cert and key (eg, generated via cert-manager)""
tls.CA.enabledSet to enable custom CA crt file - should also set tls.CA.secretfalse
tls.CA.secretSecret containing CA certificate (ca.crt)""
adminPasswordPassword for admin user. Unset to auto-generate the passwordNone
configPasswordPassword for config user. Unset to auto-generate the passwordNone
customLdifFilesCustom ldif files to seed the LDAP server. List of filename -> data pairsNone
persistence.enabledWhether to use PersistentVolumes or notfalse
persistence.storageClassStorage class for PersistentVolumes.<unset>
persistence.accessModeAccess mode for PersistentVolumesReadWriteOnce
persistence.sizePersistentVolumeClaim storage size8Gi
resourcesContainer resource requests and limits in yaml{}
test.enabledConditionally provision test resourcesfalse
test.image.repositoryTest container image requires bats frameworkdduportal/bats
test.image.tagTest container tag0.4.0

Specify each parameter using the --set key=value[,key=value] argument to helm install.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, Specify each parameter using the --set key=value[,key=value] argument to helm install.

$ helm install --name my-release -f values.yaml <helm-repo>/openldap

$ helm install --name my-release -f values.yaml stable/openldap

Tip: You can use the default values.yaml

Cleanup orphaned Persistent Volumes

Deleting the Deployment will not delete associated Persistent Volumes if persistence is enabled.

Do the following after deleting the chart release to clean up orphaned Persistent Volumes.

$ kubectl delete pvc -l release=${RELEASE-NAME}

Custom Secret

existingSecret can be used to override the default secret.yaml provided

Testing

Helm tests are included and they confirm connection to slapd.

helm install . --set test.enabled=true
helm test <RELEASE_NAME>
RUNNING: foolish-mouse-openldap-service-test-akmms
helm install . --set test.enabled=true
PASSED: foolish-mouse-openldap-service-test-akmms

It will confirm that we can do an ldapsearch with the default credentials

Deploy openldap with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has openldap on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartopenldap is pinned at v1.0.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply