Skip to content

fix(helm): create sandbox JWT secret when cert-manager is enabled#1700

Open
TaylorMutch wants to merge 1 commit into
mainfrom
1691-cert-manager-jwt-secret/tmutch
Open

fix(helm): create sandbox JWT secret when cert-manager is enabled#1700
TaylorMutch wants to merge 1 commit into
mainfrom
1691-cert-manager-jwt-secret/tmutch

Conversation

@TaylorMutch
Copy link
Copy Markdown
Collaborator

Summary

The cert-manager install path 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. This PR separates sandbox JWT signing-key provisioning from TLS PKI provisioning so the JWT Secret always exists.

Related Issue

Closes #1691

Changes

  • certgen: add a --jwt-only mode that creates only the Opaque JWT signing Secret, for use when another controller (cert-manager) owns the 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. Removes the old mutual-exclusion failure between the two values.
  • _helpers.tpl: add openshell.sandboxJwtSecretName, shared by the hook and the StatefulSet mount.
  • Docs/values/README: document the new precedence; the cert-manager install no longer needs --set pkiInitJob.enabled=false. Updated managing-certificates.mdx, openshift.mdx, architecture/gateway.md, and the debug-openshell-cluster skill.
  • Tests: new tests/certgen_test.yaml Helm unit suite (combined, JWT-only, custom secret name, both-enabled precedence) and a CLI parse test for --jwt-only.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated (762 cargo unit tests; 36 Helm unit tests across 4 suites)
  • E2E tests added/updated (if applicable)

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

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
@TaylorMutch TaylorMutch added the area:docs Documentation and examples label Jun 2, 2026
@TaylorMutch TaylorMutch added the area:cluster Related to running OpenShell on k3s/docker label Jun 2, 2026
@TaylorMutch TaylorMutch requested a review from a team as a code owner June 2, 2026 23:57
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

@TaylorMutch TaylorMutch added the test:e2e Requires end-to-end coverage label Jun 2, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Label test:e2e applied for 11485e8. Open the existing run and click Re-run all jobs to execute with the label set. The run will execute the standard E2E suite after building the required gateway and supervisor images once. The matching required CI gate status on this PR will flip green automatically once the run finishes.

@TaylorMutch TaylorMutch changed the title fix(helm): create sandbox JWT secret under cert-manager fix(helm): create sandbox JWT secret when cert-manager is enabled Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cluster Related to running OpenShell on k3s/docker area:docs Documentation and examples test:e2e Requires end-to-end coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: cert-manager Helm install does not create sandbox JWT secret

1 participant