Repository navigation
feat(chart): support namespaced Issuers - #820
Conversation
Add <valuesKey>.ingress.https.issuerKind (ClusterIssuer by default, or Issuer), which annotates the Ingress with cert-manager.io/issuer instead of cert-manager.io/cluster-issuer, for clusters where projects can't create cluster-scoped resources. The schema accepts only the two kinds; without the schema, other kinds fail to render. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Describe issuerKind in the deployment notes and the release notes of foca-common 0.6.0, and the OpenShift setup: an Ingress of the class openshift-default with edge termination, a namespaced Let's Encrypt Issuer with an HTTP-01 solver, and a Route for a second host name. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Treat issuerKind: null like an unset kind, also in app charts without a default, and fail if the Ingress's annotations name both a ClusterIssuer and an Issuer, which cert-manager refuses. Document where router annotations go and a second Ingress for a second host name, so that cert-manager renews its certificate. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Allow null for issuerKind in the values schema, as the template treats it as the default ClusterIssuer, and test it with and without the schema. Rewrap the template comment and split the OpenShift notes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Reviewer's GuideAPIUpdate the shared and example values schemas to accept
ImplementationUpdate the Ingress helper to select the cert-manager issuer annotation, default and validate the issuer kind, reject conflicting issuer annotations, and document these behaviors in the template comment.
ConfigurationAdd the
DocumentationDocument the OpenShift setup for namespaced Issuers, including the HTTP-01 solver, Ingress and Route annotations, and certificate handling for additional hostnames.
Record namespaced Issuer support and its configuration in the foca-common 0.6.0 release notes.
TestsAdd coverage for issuer selection and defaults, null values with and without schemas, invalid kinds, conflicting annotations, and behavior when HTTPS is disabled.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #820 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 76 76
Lines 10708 10708
=========================================
Hits 10708 10708
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit 0670e96 #811 feat(chart): support namespaced cert-manager Issuers · 5 of 5 met
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the issuer kind is selected incorrectly, cert-manager can request and serve the host certificate from an unintended issuer; reverting the chart does not automatically revoke certificates already issued, so they may need to be replaced or revoked.
Summary
Closes #811.
foca-common: new value<valuesKey>.ingress.https.issuerKind:ClusterIssuer(default; also when unset ornull, so existing app charts render exactly as before) orIssuer, which setscert-manager.io/issuerinstead ofcert-manager.io/cluster-issuer.app-values.schema.jsonand the petstore copy) accepts onlyClusterIssuer,Issuerornull; without the schema, the template fails on other kinds. Rendering also fails if the final annotations name both a ClusterIssuer and an Issuer (cert-manager refuses such Ingresses).docs/helm-chart.md, OpenShift section): the recipe for a namespaced Let's Encrypt Issuer with an HTTP-01 solver of classopenshift-default, an Ingress withroute.openshift.io/termination: edge, where router annotations go, and a second Ingress for a second host name. Deployment notes and petstorevalues.yamlupdated; entry in the unreleased foca-common 0.6.0 notes (no version bump needed, 0.6.0 is unreleased).Unblocks elixir-cloud-aai/Pubgrade#136.
Verification
pytest charts/foca-common/tests(Helm 3.22.1): 521 passed, incl. new tests for both kinds, the default with and withoutissuerKind,nullwith and without schema, schema rejection, schema-less invalid kinds, both annotations,issuerKindwithout HTTPS. Existing snapshots unchanged.helm lint --strictof the library and the petstore chart with everyci/*-values.yaml: passed.ruff check,ruff format --check,mypy,mkdocs build --strict: passed.Reviews
Two rounds of adversarial and quality review; all high and medium findings fixed (default path untested,
nullrejected by the schema), and the low ones (both annotations,nullwithout default, second host name via Ingress instead of a hand-made Route, wording).Declined review findings
issuerKindand rely on the schema: kept, because app charts need not copy the schema or may have an older copy.Open questions
None.
🤖 Generated with Claude Code
https://claude.ai/code/session_011FSoqN5w1v5t1QRTKU7ad5
Summary by Sourcery
Enable Ingress certificates to use namespaced cert-manager Issuers while preserving existing ClusterIssuer behavior by default.
New Features:
Bug Fixes:
Enhancements:
Documentation:
Tests:
Chores: