lldap/lldap

[BUG] Kubernetes: invalid value for ldap-port

slaecker opened this issue · 2 comments

Describe the bug
I'm trying to deploy lldap on my K3s cluster, but when the pod is starting it crashloops with the below error:

> Setup permissions..
> Starting lldap..

error: invalid value 'tcp://10.43.194.65:3890' for '--ldap-port <LDAP_PORT>': invalid digit found in string

I've tried setting LDAP_PORT to 3890 explicitly but the same error remains.

The deployment manifest:

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/name: lldap
  name: lldap
  namespace: auth
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: lldap
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/name: lldap
    spec:
      containers:
      - image: lldap/lldap:stable
        name: lldap
        resources: {}
      restartPolicy: Always

Running the lldap image in podman works just fine.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy the above manifest to Kubernetes
  2. Check the pod logs

Expected behavior
The pod starting and getting into a RUNNING state.

Logs

[entrypoint] Copying the default config to /data/lldap_config.toml
[entrypoint] Edit this file to configure LLDAP.
> Setup permissions..
> Starting lldap..

error: invalid value 'tcp://10.43.151.188:3890' for '--ldap-port <LDAP_PORT>': invalid digit found in string

For more information, try '--help'.

Additional context
K3s version: v1.28.5+k3s1

Having never run any Kubernetes command ever, I'll be of limited help.

Where is the configuration for the service? Where does the value for the port come from?

What I can help with is this:

  • the env variable you're looking for is LLDAP_LDAP_PORT
  • command line arguments take precedence over env variables, so that might not help.

Thanks, setting LLDAP_LDAP_PORT did the trick. Strange though that this is needed. Never had such an issue before with any other image. If you ever need someone doing some Kubernetes testing let me know.