Skip to content

feat/lldap postgres#297

Open
swares wants to merge 2 commits into
mainfrom
feat/lldap-postgres
Open

feat/lldap postgres#297
swares wants to merge 2 commits into
mainfrom
feat/lldap-postgres

Conversation

@swares

@swares swares commented Jul 25, 2026

Copy link
Copy Markdown
Owner
  • fix(monitoring): add the ExternalSecret PR #NNN missed
  • feat(lldap): move from SQLite to PostgreSQL so the pod can reschedule

swares added 2 commits July 25, 2026 19:16
alertmanagerSpec.secrets referenced alertmanager-endpoints, but the
ExternalSecret that creates it was a new file and never got staged
(git commit -am only stages tracked files). Alertmanager has been stuck
on FailedMount since the merge, so the cluster currently has no
alerting at all.
lldap's SQLite database lived on a local-path PVC, which carries node
affinity. On 2026-07-25 n150-2 wedged twice; both times the replacement
lldap pod was unschedulable because its volume only existed on that node,
and ALL SSO went down with it - ArgoCD, Grafana, Immich, MinIO and
Semaphore all authenticate through Authelia, which needs lldap.

With Postgres, lldap itself is stateless and schedules anywhere.

Scope, honestly: Postgres still uses a local-path PVC, so it is node-bound.
What changes is that the binding is deliberate rather than accidental, and
Postgres survives unclean shutdown far better than SQLite - which matters,
since a forced reboot corrupted an etcd bbolt file on this same hardware
the same day. Pinned to n150-1 beside authelia-postgres: Authelia and lldap
are a coupled unit, so co-locating their databases means SSO depends on one
node failing rather than two.

Also updated, each of which would have failed silently:
- NetworkPolicy: lldap has default-deny egress, so without a 5432 rule it
  cannot reach its own database and simply never becomes ready.
- backup CronJob: it mounted the SQLite PVC and copied users.db, a file
  that no longer exists. Now runs pg_dump, and asserts the dump exceeds
  1000 bytes and contains CREATE TABLE - an empty dump is more dangerous
  than a missing one because it looks like success.

lldap-data PVC is intentionally left in git as the rollback path; it still
holds users.db. Remove it in a follow-up once verified - with prune: true,
deleting it from git destroys the data.

There is no SQLite->Postgres migration path in lldap, so users, groups and
memberships are recreated by hand and passwords reset. The admin account
rebuilds from LLDAP_LDAP_USER_PASS, so Authelia's bind keeps working.

Refs: docs/REVIEW-2026-07-24.md H10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant