domino_admin_toolkit.checks.test_cert_manager module
- pydantic model domino_admin_toolkit.checks.test_cert_manager.CertManagerCrdPresenceAnalyzer
Bases:
AnalyzerBase[CrdRow]Validates that each CRD cert-manager is expected to install is actually registered.
- Fields:
- analyze(data)
Analyzes one row and returns a list of CheckResult instances.
- Return type:
- Args:
data: One row dict (
TRow). The Runner calls this once per DataFrame row.- Returns:
List[CheckResult]: A list containing the results of the analysis.
- Raises:
NotImplementedError: If this method is not implemented by subclasses.
- name: ClassVar[str] = 'CertManagerCrdPresenceAnalyzer'
- pydantic model domino_admin_toolkit.checks.test_cert_manager.CertManagerInstanceCountAnalyzer
Bases:
DataFrameAnalyzerBaseValidates the number of cert-manager controller deployments in the cluster.
- Fields:
- analyze(data)
Analyzes the full DataFrame and returns a list of CheckResult instances.
- Return type:
- Args:
data: The full DataFrame. Called once per
check_df()invocation.- Returns:
List[CheckResult]: A list containing the results of the analysis.
- Raises:
NotImplementedError: If this method is not implemented by subclasses.
- name: ClassVar[str] = 'CertManagerInstanceCountAnalyzer'
- pydantic model domino_admin_toolkit.checks.test_cert_manager.CertManagerWebhookAnalyzer
Bases:
AnalyzerBase[WebhookRow]Validates the cert-manager webhook: ready replicas and a valid, unexpired CA Secret.
Emits one result for readiness and one for the CA. ERROR (not FAIL) when the CA Secret could not be read at all — that’s a collection problem, not a detected config fault.
- Fields:
- analyze(data)
Analyzes one row and returns a list of CheckResult instances.
- Return type:
- Args:
data: One row dict (
TRow). The Runner calls this once per DataFrame row.- Returns:
List[CheckResult]: A list containing the results of the analysis.
- Raises:
NotImplementedError: If this method is not implemented by subclasses.
- name: ClassVar[str] = 'CertManagerWebhookAnalyzer'
- class domino_admin_toolkit.checks.test_cert_manager.WebhookRow
Bases:
ControllerRow
- domino_admin_toolkit.checks.test_cert_manager.cert_manager_controller_data(cert_mgr)
Controller deployment (one row per deployment, or 0 rows).
Deliberately not gated on cert-manager’s installed state — test_cert_manager_instances needs to observe the zero-deployment case to WARN, not skip.
- domino_admin_toolkit.checks.test_cert_manager.cert_manager_crd_data(cert_manager_crd_names, _cert_manager_crds_present, cert_manager_controller_data)
CRD registration status (one row per expected CRD).
Skips only when CRD listing succeeded and found nothing AND no controller Deployment exists — genuine absence. If a controller is running but its CRDs are all missing, that is exactly what this check must FAIL on, so it is not skipped. A technical failure (_cert_manager_crds_present is None) is NOT treated as “not installed”; it falls through to _collect_cert_manager_crd_data’s own error handling, which returns an empty DataFrame so test_certmgr_crds’s on_empty=Status.ERROR reports it instead of a misleading clean skip.
- domino_admin_toolkit.checks.test_cert_manager.cert_manager_webhook_data(cert_mgr, k8s_client, _cert_manager_crds_present)
Webhook Deployment readiness + CA Secret state (one row per webhook Deployment).
Skips only when no webhook exists AND the CRDs are confirmed absent (cert-manager genuinely not installed). A webhook found without CRDs is still evaluated.
- domino_admin_toolkit.checks.test_cert_manager.cert_mgr(k8s_client)
- domino_admin_toolkit.checks.test_cert_manager.test_cert_manager_instances(cert_manager_controller_data, _cert_manager_crds_present, runner)
- Description:
Checks the number of cert-manager controller Deployments in the cluster. Running more than one cert-manager instance is unsupported and leads to conflicting reconciliation of the same Certificate/Issuer resources. Issue: https://github.com/cert-manager/cert-manager/issues/2525
Uses the tight app.kubernetes.io/name=cert-manager,component=controller label selector (not instance=) so this check does not accidentally count the unrelated Domino custom-cert-manager product, which coexists on the same clusters and would otherwise trigger a false cert-manager#2525 match.
Zero deployments is not always a benign WARN: if cert-manager’s CRDs are registered (_cert_manager_crds_present) but no controller Deployment is found, that’s either a partial/broken install or a technical failure listing Deployments (e.g. an RBAC gap narrower than what allows listing CRDs) — either way worth investigating, so it’s escalated to FAIL. Only “CRDs absent too” (cert-manager genuinely never installed) stays a WARN.
- Failure Conditions:
More than one cert-manager controller Deployment found (cert-manager#2525)
No controller Deployment found, but cert-manager’s CRDs ARE registered (partial/broken install, or a technical failure listing Deployments)
The controller Deployment exists but has no ready replicas (scaled to 0, or pods crash-looping) — nothing issues or renews certificates in this state
- Warning Conditions:
No cert-manager controller Deployment found AND no CRDs registered either — cert-manager may not be installed on this cluster; the rest of the cert-manager check family will be stale or empty as a result
- Troubleshooting Steps:
List cert-manager deployments directly: kubectl get deploy -A -l app.kubernetes.io/name=cert-manager,app.kubernetes.io/component=controller
If more than one is found, determine how the duplicate was introduced (e.g. a second Helm release, a manual apply) and remove it.
If zero are found but CRDs are registered, check RBAC on Deployments specifically (it may be narrower than what allows listing CRDs) before assuming the install is genuinely broken.
If the Deployment has no ready replicas, check whether it was scaled down (kubectl get deploy -n domino-platform cert-manager) or its pods are failing (kubectl describe pod / kubectl logs -n domino-platform -l app.kubernetes.io/name=cert-manager)
Confluence cert-manager runbook: page 2716729345
- Resolution Steps:
Uninstall the duplicate cert-manager release/Deployment, keeping the one managed by the Domino platform Helm chart.
- Required Permissions:
kubectl read access to Deployments in all namespaces
- See also:
test_tls_secret_expiration.py — storage-layer cert expiry check (RE-3163)
test_cert_manager_resources.py — Certificate/Issuer CR readiness (RE-3164); expect stale or missing output there if this check is FAIL or WARN
test_webhook_ca_bundle_expiration.py — if cainjector is broken because of multiple cert-manager instances, this is how a webhook caBundle expiry is noticed
test_domino_url_cert.py — Domino frontend TLS cert via live SSL handshake
info/test_certificate_inventory.py — full cert inventory with chain validation
cert-manager#2525 — https://github.com/cert-manager/cert-manager/issues/2525
Confluence: cert-manager runbook, page 2716729345
- domino_admin_toolkit.checks.test_cert_manager.test_cert_manager_webhook(_cert_manager_crds_present, cert_manager_webhook_data, runner)
- Description:
Checks the health of the cert-manager webhook, which the Kubernetes API server calls to validate and default every Certificate, Issuer and CertificateRequest. If it is down, cert-manager resources cannot be created or updated, and certificates stop being issued or renewed even though the controller looks healthy.
Two things are checked per webhook Deployment:
Readiness — at least one ready replica.
The CA Secret — the webhook runs in “dynamic serving” mode (–dynamic-serving-ca-secret-name, default cert-manager-webhook-ca): it has no mounted TLS files and signs its own serving certificate in memory from a self-managed CA stored in that Secret. The Secret must exist, hold a parsable certificate, and not be expired. A CA within 30 days of expiry is a WARN, since cert-manager normally rotates it well before then.
This replaces an earlier Prometheus check on certwatcher_read_certificate_* counters. Those counters are exported by other operators (controller-runtime’s certificate watcher), not by any cert-manager component, so they never reflected cert-manager’s health.
- Failure Conditions:
The webhook Deployment has no ready replicas
The CA Secret is missing or empty
The CA Secret holds no valid certificate (corrupt or malformed)
The CA certificate has expired
No webhook Deployment found although cert-manager’s CRDs are registered
- Warning Conditions:
The CA certificate expires within 30 days (rotation may be stuck)
- Error Conditions:
The CA Secret could not be read (API/RBAC failure)
CRD listing failed and no webhook Deployment was found
- Troubleshooting Steps:
Check the webhook Deployment and its pods: kubectl get deploy,pods -n domino-platform -l app.kubernetes.io/component=webhook
Check the webhook logs for CA or serving-certificate errors: kubectl logs -n domino-platform deploy/cert-manager-webhook –tail=100
Inspect the CA certificate in the Secret: kubectl get secret cert-manager-webhook-ca -n domino-platform -o jsonpath=’{.data.tls.crt}’ | base64 -d | openssl x509 -noout -dates -subject
Check that cainjector has injected the CA into the webhook configurations (the webhook creates and regenerates the CA Secret; cainjector copies it out): kubectl get validatingwebhookconfiguration cert-manager-webhook -o yaml kubectl logs -n domino-platform deploy/cert-manager-cainjector –tail=100
Confluence cert-manager runbook: page 2716729345
- Resolution Steps:
Scale or restart a webhook with no ready replicas: kubectl rollout restart deploy/cert-manager-webhook -n domino-platform
For a corrupt or expired CA: delete the cert-manager-webhook-ca Secret and restart the webhook, which regenerates it. cainjector re-injects the new CA. Do this in a maintenance window — admission is briefly unavailable.
- Required Permissions:
Read access to Deployments (all namespaces) and to the webhook CA Secret
- See also:
test_cert_manager_instances (above) — controller readiness; the controller and the webhook must both be up for certificates to be issued
test_webhook_ca_bundle_expiration.py — caBundle expiry across every webhook configuration in the cluster, including cert-manager’s own
test_cert_manager_resources.py — Certificate/Issuer CR readiness (RE-3164)
test_tls_secret_expiration.py — check which certs are expiring or unreadable
info/test_certificate_inventory.py — full cert inventory
Confluence: cert-manager runbook, page 2716729345
- domino_admin_toolkit.checks.test_cert_manager.test_certmgr_crds(cert_manager_crd_data, runner)
- Description:
Checks that each CRD cert-manager is expected to install is actually registered in the cluster:
clusterissuers.cert-manager.io — certificate authorities (cluster scoped)
issuers.cert-manager.io — certificate authorities (namespace scoped)
certificates.cert-manager.io — certificate resources issued by cert-manager
certificaterequests.cert-manager.io — certificate requests for cert-manager
orders.acme.cert-manager.io — ACME issue Orders
challenges.acme.cert-manager.io — ACME Challenges
A missing CRD blocks the entire certificate-issuance flow for resources of that kind, so this is treated as a hard failure rather than informational.
- Failure Conditions:
Any of the six expected CRDs is not registered in the cluster
- Troubleshooting Steps:
List registered cert-manager CRDs directly: kubectl get crd | grep cert-manager.io
Compare against the cert-manager Helm release/manifest to see what should be installed: kubectl get crd -l app.kubernetes.io/name=cert-manager
Confluence cert-manager runbook: page 2716729345
- Resolution Steps:
Re-apply the cert-manager CRD manifests for the installed version: https://cert-manager.io/docs/installation/upgrading/
Do not delete/recreate CRDs on a cluster with existing cert-manager resources without a migration plan — this can orphan existing Certificates, Issuers, and CertificateRequests.
- Required Permissions:
kubectl read access to CustomResourceDefinitions (cluster-scoped)
- See also:
test_cert_manager_instances (above) — missing CRDs often accompany a broken or partial cert-manager install; check both together
test_cert_manager_resources.py — Certificate/Issuer CR readiness (RE-3164); expect stale or missing output there if CRDs are missing here
test_tls_secret_expiration.py — missing CRDs will block all cert renewals; check for expiring certs immediately
info/test_certificate_inventory.py — full cert inventory to assess blast radius of missing CRDs
test_domino_url_cert.py — Domino frontend cert renewal also depends on these CRDs being present
test_webhook_ca_bundle_expiration.py — missing CRDs also block cainjector’s ability to re-populate webhook caBundles; check for expiring caBundles immediately
Confluence: cert-manager runbook, page 2716729345