fix(helm): create sandbox JWT secret when cert-manager is enabled#1700
Conversation
|
🌿 Preview your docs: https://nvidia-preview-pr-1700.docs.buildwithfern.com/openshell |
|
Label |
PR Review StatusValidation: This PR is project-valid because it directly addresses #1691 by separating sandbox JWT Secret provisioning from TLS PKI provisioning in the Helm cert-manager path. Review findings:
Next state: |
The cert-manager install path (certManager.enabled=true, pkiInitJob.enabled=false) left the gateway StatefulSet unable to start because nothing created the openshell-jwt-keys Secret: cert-manager owns TLS Secrets but does not mint the sandbox JWT signing key, and the certgen hook only rendered when pkiInitJob.enabled was true. Separate JWT signing-key provisioning from TLS PKI provisioning: - certgen: add a --jwt-only mode that creates only the Opaque JWT signing Secret, for use when another controller owns TLS Secrets. - certgen.yaml: render the hook when pkiInitJob.enabled OR certManager.enabled is true. cert-manager takes precedence and runs the hook with --jwt-only even if pkiInitJob.enabled remains true. Remove the mutual-exclusion failure between the two values. - _helpers.tpl: add openshell.sandboxJwtSecretName, shared by the hook and the StatefulSet mount. - Update values, README, docs, architecture, and the debug-openshell-cluster skill to reflect the new precedence; the documented cert-manager install no longer needs pkiInitJob.enabled=false. Closes #1691
The client CA volume logic treated pkiInitJob.enabled as proof that built-in PKI owns the client CA. With cert-manager precedence now allowing certManager.enabled=true alongside the default pkiInitJob.enabled=true, that assumption mounts the server TLS cert secret as the client CA and ignores certManager.clientCaFromServerTlsSecret=false, which can break mTLS or trust the wrong CA. Gate the pkiInitJob.enabled term with (not certManager.enabled) in all three client CA conditions (volume mount, volume definition, and secret selection) so cert-manager owns TLS when enabled. Add a Helm test suite covering built-in PKI, cert-manager shared CA, the regression config (cert-manager + clientCaFromServerTlsSecret=false + default pkiInitJob), and the no-client-CA case.
8225d9f to
8b5b097
Compare
BlockedGator is blocked by an infrastructure failure in the required Helm Lint check, not by a PR code issue. Current CI summary for head
Failure: Next action: a maintainer should rerun the Helm Lint workflow once the registry rate limit clears, or update the CI dependency-fetch path to use authenticated/cached access. Gator will keep watching this PR. |
Reran, this is passing now |
Maintainer Approval NeededGator validation and PR monitoring are complete. Validation: PR #1700 is project-valid because it fixes #1691, a reproducible Helm cert-manager install failure where the gateway cannot mount the sandbox JWT signing Secret. Human maintainer approval or merge decision is now required. |
Summary
The cert-manager install path left the gateway StatefulSet unable to start because nothing created the
openshell-jwt-keysSecret. cert-manager owns TLS Secrets but does not mint the sandbox JWT signing key, and the certgen hook only rendered whenpkiInitJob.enabledwas true. This PR separates sandbox JWT signing-key provisioning from TLS PKI provisioning so the JWT Secret always exists.Related Issue
Closes #1691
Changes
--jwt-onlymode that creates only the Opaque JWT signing Secret, for use when another controller (cert-manager) owns the TLS Secrets.pkiInitJob.enabledorcertManager.enabledis true. cert-manager takes precedence and runs the hook with--jwt-onlyeven ifpkiInitJob.enabledremains true. Removes the old mutual-exclusion failure between the two values.openshell.sandboxJwtSecretName, shared by the hook and the StatefulSet mount.--set pkiInitJob.enabled=false. Updatedmanaging-certificates.mdx,openshift.mdx,architecture/gateway.md, and thedebug-openshell-clusterskill.tests/certgen_test.yamlHelm unit suite (combined, JWT-only, custom secret name, both-enabled precedence) and a CLI parse test for--jwt-only.Testing
mise run pre-commitpassesChecklist