Bugs should be filed for issues encountered whilst operating cert-manager.
You should first attempt to resolve your issues through the community support
channels, e.g. Slack, in order to rule out individual configuration errors.
Please provide as much detail as possible.
When we delete a certificate from the cluster, cert-manager still expose metrics for the deleted certificate.
The only way to fix this is a restart of the cert-manager pod
example:
kubectl get certificate -n cockroach-secure-test
No resources found.
But the metrics for the certificates are still exposed
certmanager_certificate_ready_status{condition="False",name="cockroach-ca-crt",namespace="cockroach-secure-test"} 0
certmanager_certificate_ready_status{condition="False",name="cockroach-node-cert",namespace="cockroach-secure-test"} 0
certmanager_certificate_ready_status{condition="False",name="cockroach-root-cert",namespace="cockroach-secure-test"} 0
certmanager_certificate_ready_status{condition="True",name="cockroach-ca-crt",namespace="cockroach-secure-test"} 1
certmanager_certificate_ready_status{condition="True",name="cockroach-node-cert",namespace="cockroach-secure-test"} 1
certmanager_certificate_ready_status{condition="True",name="cockroach-root-cert",namespace="cockroach-secure-test"} 1
certmanager_certificate_ready_status{condition="Unknown",name="cockroach-ca-crt",namespace="cockroach-secure-test"} 0
certmanager_certificate_ready_status{condition="Unknown",name="cockroach-node-cert",namespace="cockroach-secure-test"} 0
certmanager_certificate_ready_status{condition="Unknown",name="cockroach-root-cert",namespace="cockroach-secure-test"} 0
Describe the bug:
cert-manager is not deleting metrics for deleted certificates
Expected behaviour:
cert-manager should cleanup metrics for deleted certificates
Steps to reproduce the bug:
create a certificate via cert-manager
check the exposed cert-manager metrics certmanager_certificate_ready_status
delete the certificate via kubectl
check the exposed cert-manager metrics certmanager_certificate_ready_status for the delete certificate again.
Anything else we need to know?:
We use a selfSigned Clusterissuer
Environment details::
/kind bug
I can also confirm this bug for v.0.12.0. However restarting the cert-manager does not fix this for me.
This issue still persist also in v0.13.0
And v0.13.1
This issue is still present in v0.14.1
If anyone is able to take a look at this it'd be greatly appreciated!
/milestone Next
Looks like a bigger issue with the way we handle deleted resources and getting that over to the metrics object.
We also need to get this implemented in the newer certificates controllers.