Skip to content

[#1089] Add the official OpenDJ Helm chart - #1311

Open
vharseko wants to merge 12 commits into
OpenIdentityPlatform:masterfrom
vharseko:features/opendj-helm
Open

vharseko wants to merge 12 commits into
OpenIdentityPlatform:masterfrom
vharseko:features/opendj-helm

Conversation

@vharseko

@vharseko vharseko commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Fixes #1089. Implements the official Helm chart proposal.

Depends on #1308 for the administration certificate Secret. This branch is based on a8d4c1af6c from #1308. Before installing a mounted or intact pending pair, the validator checks signing capability, certificate usage, and key type for the selected admin-cert entry. The RSA-PSS probe requires a TLS signature scheme with SHA-256, SHA-384, or SHA-512 and matching MGF1 and salt parameters. The Docker tests also cover PIN-only recovery with queued configuration changes.

Changes

  • Add a StatefulSet with retained per-replica volumes, separate peer and client Services, LDAP probes, and TLS Secrets for LDAPS and administration.
  • Document installation, manual replica resizing, and certificate rotation. Retire the legacy OpenShift Template and remove it from release assets.
  • Run Helm checks in Build with the Docker image from the same workflow run.
  • Attach the packaged Helm chart (.tgz) to Package/Deploy runs. Use the version from the branch's Maven POM for the chart and application versions.
  • Package the release chart from the tagged sources after the Docker image push succeeds. Publish the same .tgz to Docker Hub and GHCR and attach it to the GitHub release. The release attachment is still uploaded if the OCI publication fails. Read the chart's application version from the release POM.
  • Document how to drain client traffic or direct it to a verified survivor before starting a returning replica with a retained PVC. Check both the Directory Manager and replication administrator passwords directly on the running pod. Repair stale credentials and restart the returning pod before waiting for rollout. Verify catch-up and two-way replication before restoring client traffic.
  • Use the GHCR image in GHCR install examples and document how to install a snapshot chart archive with an image from the same sources.
  • Document how to replace and verify a certificate before disabling its TLS Secret projection and how to provision trusted certificates on fresh PVCs.
  • Wait for both new keystore and PIN pairs to appear on the running pod before checking that tls.refreshSeconds: 0 keeps the existing certificates until restart.

Verification

  • Helm lint, 25 template tests, and schema validation for Kubernetes 1.34 and 1.36.
  • On kind 1.36, verified replica counts 1 → 2 → 1 → 2 and 2 → 3 → 2 → 3, two-way replication, recovery after PVC loss, catch-up on a retained PVC, and live and restart-time TLS renewal on ports 1636 and 4444.
  • Verified LDAP reads and writes with an arbitrary non-root UID and a group-writable Docker volume. OpenShift SCC admission still needs a cluster run.
  • Ran the Maven documentation build and checked the revised installation guide's cross-references. Verified the Helm package version and an OCI push and pull against a local registry.
  • For the workflow attachment changes, ran actionlint and packaged both the release and snapshot charts locally. Checked the archive filenames, metadata, and the archive path used by the upload and OCI steps.
  • For the first review update, ran Helm lint, all 25 template tests, Kubernetes schema validation, and the documentation cross-reference check. Rendered both packaged charts with their documented image settings and confirmed the image reference in the StatefulSet and Helm test hook.
  • On kind 1.36.4, verified that the temporary client Service selects only the named pod and reran the TLS renewal scenario. A deliberately modified chart that ignored tls.refreshSeconds: 0 with both connectors enabled failed the updated test as expected.
  • For this documentation update, Helm lint and the cross-reference check passed for 635 links across 76 pages. Rendering both grow steps confirmed that the second step changes only the StatefulSet replica count.
  • After rebasing onto a8d4c1af6c, git range-diff confirmed that all five Helm patches match the previous revision. Helm 3 and 4 lint, all 25 chart tests, actionlint, shell syntax checks, and Java 11 compilation of the validator and fixture generator passed.
  • For the [#1307] Load the Docker administration certificate from a mounted Secret #1308 dependency, all 20 administration TLS scenarios passed on both the standard and Alpine Docker images. A compatible RSA-PSS pair completed CA- and hostname-verified TLS 1.2 and 1.3. A pair with no compatible scheme left the installed certificate in service during Secret sync and intact pending recovery. #1308 verification results

@vharseko
vharseko requested a review from maximthomas November 18, 2026 14:54
@vharseko vharseko added bug packaging deb/rpm/MSI, distribution layout, config.ldif kubernetes Kubernetes / Helm / OpenShift deployment enhancement CI docs docker replication tls TLS connections, certificates, and encrypted handshakes tests Test suites: fixing, enabling, un-disabling labels Nov 18, 2026
@vharseko vharseko added this to the 5.3.0 milestone Nov 18, 2026
@vharseko
vharseko force-pushed the features/opendj-helm branch from 8e6bf76 to d77bac8 Compare November 18, 2026 16:38
@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I rebased this PR onto the current head of #1308, which includes the administration TLS Secret rotation fixes. In d77bac8, Package/Deploy now uploads the Helm chart as a downloadable .tgz. The Release workflow attaches the same archive it publishes to Docker Hub and GHCR after the Docker image is published. If the OCI upload fails, the file still goes to the GitHub release.

I ran actionlint and packaged both the release and snapshot charts locally to check their filenames, metadata, and upload paths.

@vharseko
vharseko requested review from maximthomas and removed request for maximthomas November 18, 2026 16:38

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The chart separates peer DNS from the LDAP client Service and exercises scale-in and scale-out with retained claims in CI.


issue (blocking): Keep returning replicas out of client traffic until they catch up.

opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-replication.adoc:171

A returning ordinal with a retained PVC can pass the root-DSE probe before its background join finishes. The shared LDAP Service then routes reads and writes to it while the data can still be stale. If the Directory Manager password changed while the ordinal was offline, its local credential is still the old one and the join can give up while readiness stays green. Document how to drain shared-Service traffic or route it to a verified survivor before regrow, then bring the ordinal back into service after checking its credentials and replication directly. Startup marker, Client selector, Join retry


issue (non-blocking): Give the snapshot chart archive a usable image reference.

.github/workflows/deploy.yml:284

The uploaded archive renders both the StatefulSet and Helm test with openidentityplatform/opendj:5.2.1-SNAPSHOT. Docker Hub returned no manifest for that tag, and Build keeps its test image in the workflow instead of publishing that tag. A standard install of the downloaded chart therefore hits ImagePullBackOff. Document how to supply a matching snapshot image via image.repository and image.tag, or publish the matching image with the archive. Build image repository, Chart image reference


issue (non-blocking): Use the GHCR image in the GHCR install example.

opendj-doc-generated-ref/src/main/asciidoc/install-guide/chap-install.adoc:1290

The OCI URL sets the chart source. Both the StatefulSet and test hook still pull the image from Docker Hub, so a fresh cluster with access only to GHCR cannot start either pod. Add --set image.repository=ghcr.io/openidentityplatform/opendj/opendj to the GHCR example and keep the release tag from the chart. Default image repository, Published image repositories


issue (non-blocking): Remove abandoned administrative keystore staging directories on startup.

opendj-packages/opendj-docker/run.sh:182

Stopping the pod during validation can leave the staged private keystore and PIN on the PVC. Startup only resumes the fixed .admin-secret-pending directory, so the abandoned pair survives later rotations. A local interruption test with synthetic files confirmed that the next installation succeeds and the old staging files remain. Clean uncommitted staging during startup before starting the watcher, and preserve the pending directory for recovery. Pending pair recovery, Existing-volume startup


issue (non-blocking): Explain what happens to the active certificate when disabling a TLS Secret projection.

opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-change-certs.adoc:691

OpenDJ uses copies of the keystore and PIN stored on its PVC. Turning off a projection leaves those copies in place, so an existing replica can continue serving the previous certificate after rollout. Document how to install and verify a replacement key pair before removing its Secret source. Volume mounts, Secret installation


suggestion (non-blocking): Wait for TLS Secret projection before checking that refresh is disabled.

.github/scripts/helm-test-opendj.sh:388

The script checks the old serials immediately after updating the Secrets, then replaces the pod. Those checks can pass with polling active because either kubelet has yet to project the new files or the watcher has yet to run. A chart regression that drops the value only with both connectors configured would also pass the admin-only template test and the direct Docker watcher test.

Pin: Verify that both replacement keystore/PIN pairs are visible on the same running pod, then assert that polling is disabled and both old serials are still served before replacing the pod.

@vharseko
vharseko force-pushed the features/opendj-helm branch from d77bac8 to 48873a5 Compare November 19, 2026 17:32
@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas Addressed the review in 48873a5a92.

  • The resize guide now shows how to pause LDAP traffic or redirect it to a Service pinned to a verified survivor before starting a returning replica with its retained PVC. It covers direct credential, catch-up, and two-way replication checks before restoring shared-Service traffic.
  • The snapshot archive README shows how to supply image.repository and image.tag for an image built from the same sources. The GHCR examples use ghcr.io/openidentityplatform/opendj/opendj and take the tag from the chart.
  • The branch includes the staging cleanup from [#1307] Load the Docker administration certificate from a mounted Secret #1308 (05b9cde730). Startup removes abandoned staging directories and can still complete an interrupted installation from .admin-secret-pending.
  • The TLS guide explains that disabling a projection leaves the installed pair on each PVC. It documents replacing and verifying the certificate before removing the projection, then verifying it again after rollout.
  • The Helm test now waits for both replacement keystore and PIN pairs to appear on the same running pod, verifies SECRET_VOLUME_REFRESH=0 and both existing serials, then replaces the pod and checks that both new serials are served.

The TLS scenario passed on kind 1.36.4. The updated test rejected a trial chart that ignored tls.refreshSeconds: 0 when both connectors were enabled. Helm lint, all 25 template tests, Kubernetes schema validation, and the documentation cross-reference check also passed.

@vharseko
vharseko requested a review from maximthomas November 19, 2026 17:33

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The resize guide gives operators a way to route clients to one verified survivor while checking the returning replica.


issue (non-blocking): Verify the replication administrator password on the returning replica before restarting it.

opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-replication.adoc:188

The returning PVC can hold an older password for cn=admin,cn=Administrators,cn=admin data as well as an older Directory Manager password. Repairing only Directory Manager allows bootstrap to reach dsreplication disable, where the global administrator bind can still fail and leave stale replication configuration in place. Say to check the global administrator password directly on the returning pod and reset it there as Directory Manager if it missed the rotation. Keep the existing traffic gate in effect until the replication checks pass. Join reset, CLI bind, Password reset procedure


suggestion (non-blocking): Explain how to provision trusted certificates on fresh PVCs after removing a projection.

opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-change-certs.adoc:695

After the projection is disabled, a later scale-out or PVC replacement has no persisted copy of the replacement pair. The new pod bootstraps with setup-generated certificates, which clients that require the configured CA or DNS names can reject. Say to keep or re-enable the projection before provisioning fresh claims when those replicas must serve the same trusted certificate. Fresh-volume bootstrap, Secret copy on startup


suggestion (non-blocking): Validate and preserve the LDAPS keystore and PIN as a pair in a Docker follow-up.

opendj-packages/opendj-docker/run.sh:119

When separate Secret sources disagree during password rotation, the existing Docker copy loop can persist a new PIN beside the old keystore. The initial TLS key load can then fail on restart. An isolated Temurin 25 check using the current copy function reproduced the unreadable persisted keystore. A separate Docker issue can validate the candidate pair before replacing the working one. Split Secret configuration, Initial key load


suggestion (non-blocking): Coordinate live administration nickname changes with Secret installation in a #1308 follow-up.

opendj-packages/opendj-docker/run.sh:235

The watcher reads the administration configuration before it installs the staged Secret. If an operator switches from admin-cert to an alias in the existing store during that interval, the watcher can still install a store containing only admin-cert. New administration TLS connections can then fail because the active nickname is absent. Track synchronization with live configuration changes in #1308 or document how to disable refresh during a nickname change. Live connector update, Keystore reload, Alias selection

@vharseko
vharseko force-pushed the features/opendj-helm branch from 48873a5 to 6134066 Compare November 20, 2026 08:39
@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas Addressed the documentation points in 61340660b7 and rebased onto #1308 at 9ebebe322c.

  • The resize guide now checks both the Directory Manager and replication administrator passwords directly on the returning pod. It links to the reset procedure and keeps client traffic on the verified survivor or paused until catch-up and two-way replication are verified.
  • The TLS guide now explains that pods starting on fresh PVCs without the projection use setup-generated self-signed certificates. It documents when to keep or re-enable the projection.

The documentation cross-reference check passed for 635 links across 76 pages.

The two Docker changes are follow-up work. LDAPS needs to validate the keystore and PIN together before replacing the working pair. The #1308 update checks the administration configuration immediately before installing an intact staged pair. A live alias change can still race with the file replacement after that check.

@vharseko vharseko added the java Changes to Java sources label Nov 20, 2026
@vharseko
vharseko requested a review from maximthomas November 20, 2026 08:41

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The TLS guide now explains when fresh PVCs need a Secret projection to receive a trusted certificate.


issue (blocking): Use a #1308 revision that preserves a working administration TLS pair.

opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-change-certs.adoc:667

The chart passes the projected administration pair to the Docker entrypoint. The validator in the pinned #1308 dependency checks that admin-cert is a private-key entry and that the keystore loads, so it can replace a working pair with one whose selected key cannot authenticate TLS. The #1308 review verified handshake failures on TLS 1.2 and 1.3. Affected pods can remain Ready because the chart probes LDAPS on 1636, leaving the failure on 4444 invisible to readiness. Rebase onto a fixed #1308 revision before merging the chart. Chart projection · Validator · LDAPS probe · Dependency review


suggestion (non-blocking): Track pairwise LDAPS Secret installation in a separate Docker issue.

opendj-packages/opendj-docker/run.sh:116

The existing LDAPS copy loop updates the keystore and PIN separately. If separate Secret sources temporarily disagree during a password rotation, it can persist a pair that fails to load on the next start. Validate the candidate pair together and preserve the installed pair until the replacement is usable. Initial key manager load · Previous review · Author response


suggestion (non-blocking): Coordinate live administration nickname changes with Secret installation in a Docker follow-up.

opendj-packages/opendj-docker/run.sh:154

The rebase moves the configuration check closer to the file replacement. The live configuration can still change after that check, so a replacement store containing only the previous nickname can make the administration connector fail new TLS handshakes. Track coordination with live nickname changes in #1308 or document how to pause Secret refresh during the change. Live configuration update · Alias selection · Author response


issue (non-blocking): Run the retained-PVC credential checks before waiting for rollout completion.

opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-replication.adoc:190

The grow commands wait for readiness before the guide reaches the password checks. If the returning pod accepts the current Directory Manager password but its replication administrator password is stale, the background join can remove the readiness marker before its replication administrator bind fails. LDAP remains available directly while the rollout waits. Keep client traffic isolated and have operators check both binds directly on the running pod via kubectl exec. Repair any stale password and restart the pod before waiting for rollout and verifying replication. Rollout waits · Readiness marker and admin bind · Readiness check


suggestion (non-blocking): Cover PIN-only recovery with a queued configuration change in #1308.

.github/scripts/docker-test-admin-certificate.sh:208

The PIN-only fixture runs without queued changes. The queued-change fixture has both files pending, so both tests can pass if a future queue guard also discards the outstanding PIN after the new keystore has moved into place. Add a harmless queued change to the PIN-only fixture. Queued change fixture · Recovery branches · Dependency review

Pin: After restart without the Secret mount, check the recovered certificate serial and a successful CA- and hostname-verified dsconfig call.

@vharseko
vharseko force-pushed the features/opendj-helm branch from 6134066 to f0c5652 Compare November 20, 2026 10:37
@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas Rebased this PR onto #1308 at 0d02e4e85a and updated the resize guide in f0c565212e.

  • The Docker validator checks that the selected admin-cert key can sign, matches the certificate and its key type, and is permitted by the certificate's Key Usage and Extended Key Usage. An unusable mounted or intact pending pair leaves the installed certificate in place. The PIN-only recovery test also covers a queued configuration change and restart without the Secret mount.
  • When a pod returns with a retained PVC, the guide starts it without waiting for rollout and checks both binds directly on the running pod with kubectl exec. If either password needs repair, the operator restarts the pod after both binds succeed. Client traffic stays isolated through rollout, catch-up, and two-way replication checks.

Helm lint and the documentation check passed for 635 links across 76 pages. The two resize manifests confirm that the second grow step changes only the replica count. The #1308 dependency passed all 17 administration TLS scenarios on each Docker image variant.

Pairwise LDAPS installation and coordination with live administration nickname changes are separate Docker follow-ups.

@vharseko
vharseko requested a review from maximthomas November 20, 2026 10:38

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The resize guide now checks both binds on the returning pod before waiting for rollout.

@maximthomas
maximthomas self-requested a review November 20, 2026 11:54
@vharseko
vharseko force-pushed the features/opendj-helm branch from f0c5652 to 0b1cf3d Compare November 20, 2026 12:46
@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I rebased #1311 onto #1308 at a8d4c1af6c. All five Helm patches match the previous revision. Helm lint on Helm 3 and 4, all 25 chart tests, and actionlint passed after the rebase.

CodeQL alert #1698 comes from the query's algorithm allowlist, which omits the RSASSA-PSS identifier used by the Docker validator. The updated validator explicitly configures the TLS schemes with SHA-256, SHA-384, or SHA-512, the corresponding MGF1 digest, and a salt length of 32, 48, or 64 bytes. If CodeQL reports the same call on the new revision, I would classify that finding as a false positive. CodeQL alert · RFC 8446 §4.2.3

The #1308 tests confirm that a compatible RSA-PSS pair serves verified TLS 1.2 and 1.3 on port 4444 and that an incompatible pair leaves the previous certificate in service. #1308 verification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug CI docker docs enhancement java Changes to Java sources kubernetes Kubernetes / Helm / OpenShift deployment packaging deb/rpm/MSI, distribution layout, config.ldif replication tests Test suites: fixing, enabling, un-disabling tls TLS connections, certificates, and encrypted handshakes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenShift template: replication parameters are never passed, the Secret is unused and malformed, and nothing tests it

3 participants