Skip to content

feat: add cert-manager integration for Fabric CA#44

Open
Manideep3969 wants to merge 2 commits into
npci:mainfrom
Manideep3969:feature/cert-manager-ca
Open

feat: add cert-manager integration for Fabric CA#44
Manideep3969 wants to merge 2 commits into
npci:mainfrom
Manideep3969:feature/cert-manager-ca

Conversation

@Manideep3969

Copy link
Copy Markdown

cert-manager integration for Fabric CA

Closes #2

What it does

Adds cert-manager integration to the Fabric CA helm chart, enabling automatic TLS certificate provisioning at the ingress layer while preserving the existing self-signed TLS architecture inside the pod.

Key changes

  • New: certificate.yaml template — explicit cert-manager Certificate CRD
  • New: Example values for root CA and ICA with cert-manager enabled
  • Modified: ingress.yaml — conditional backend-protocol: HTTPS annotation (replaces ssl-passthrough when cert-manager is enabled)
  • Modified: configmap.yamlCURL_VERIFY_FLAG variable (switches --cacert vs --insecure based on trustCA.enabled)
  • Modified: deployment.yaml — optional trustCA volume mount for parent CA certificate
  • Modified: values.yaml — new certManager section with issuerRef, duration, renewBefore, trustCA
  • Modified: README.md — cert-manager usage documentation
  • Bumped: Chart version 1.2.0 → 1.3.0

Architecture

Two-layer TLS: cert-manager terminates TLS at the ingress, Fabric CA keeps its self-signed TLS internally. The ssl-passthrough annotation is removed when cert-manager is enabled and replaced with backend-protocol: HTTPS.

Backward compatibility

certManager.enabled: false by default — existing deployments are unaffected.

Verified on K8s

  • Tested with k3s + cert-manager v1.15.4 + self-signed ClusterIssuer
  • Certificate CRD provisions correctly, TLS secret created, ingress annotations correct
  • Template rendering validated for all three modes (disabled, enabled without trustCA, enabled with trustCA)
  • Bug found and fixed: removed cert-manager.io/issuer annotations from ingress to prevent duplicate Certificate CRDs

Add cert-manager support to the fabric-ca helm chart for ingress TLS
termination. This replaces the ssl-passthrough pattern with standard
cert-manager-provisioned certificates, enabling publicly-trusted TLS
for CA endpoints.

Changes:
- New template: certificate.yaml (cert-manager Certificate CRD)
- Modified: ingress.yaml (cert-manager annotations + TLS block)
- Modified: configmap.yaml (conditional --cacert vs --insecure)
- Modified: deployment.yaml (volume mount for trusted CA cert)
- Modified: values.yaml (certManager config section)
- Modified: Chart.yaml (bump to 1.3.0)
- Modified: README.md (cert-manager docs, migration guide)
- New example: root-ca-certmanager.yaml
- New example: ica-orderer-certmanager.yaml

Architecture: Two-layer TLS pattern
- External: cert-manager terminates TLS at ingress
- Internal: Fabric CA keeps its own self-signed TLS (unchanged)
- Backward compatible: certManager.enabled=false preserves existing behavior

The trustCA option allows ICA init containers to verify parent CA
certificates without --insecure, eliminating the CA bootstrap
trust vulnerability when cert-manager is active.
…Certificate CRDs

The cert-manager ingress-shim auto-creates a Certificate CRD when it sees
cert-manager.io/issuer annotations on the ingress, causing duplicates with
the explicit certificate.yaml template. Remove the annotations and rely
solely on the Certificate CRD template for provisioning.

Also switch example values to selfsigned-issuer for local testing.
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.

Integration with cert-manager for CAs

1 participant