-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route with cert-manager annotations is not created #38
Comments
It looks like there is an issue with the route definition? In the logs the route is visible, but in the pasted configuration Can you also check to see whether a CertificateRequest CR was generated? I don't see the event for it in your attachment but there is a log message the CR is not ready. If it was cceated, can you check to make sure the issuer is in a Ready state in the default namespace and perhaps check your cert-manager controller logs (assuming the certificate request was created).
"CR not ready"
I was able to successfully generate a certificate using your provided Route spec, aside from the apiVersion that needed a correction. |
Thank you. I'll try. |
@ctrought Hi, I tried to fix the route's apiVersion (it's in our operator code) and re-deployed our resources. But the route is still not able to be deployed. The route is created/deployed by our operator based on Here is the output of the command I tried:
In oc_get_events_n_default.output I see some error like
Not sure if that's relevant. But I do see the CSR get approved in the same file:
I'm not sure what could be the issue. Please help. Thanks |
That sounds like something else is causing it. Cert-manager routes won't delete your route. Maybe whatever you're using to deploy the route is removing the route? Have you tried deploying the route directly instead of using the operator you mentioned? You can check the kube api-server audit logs to see what's deleting the route. Since you're using OpenShift, you can use the cluster logging operator to send audit logs to elasticsearch or loki to query the audit logs if you don't already. Or you can use the CLI to view them https://docs.openshift.com/container-platform/4.13/security/audit-log-view.html |
Thanks. Yes turns out it's out operator's bug that causes the Route resource being deleted. Now with the bug fixed the route seems working (I can access the service via the route). However it looks like the route is not using the certificate from openshift-route. There is no cert resource generated (in default namespace). By examining the certificate it seems that the route is using the default certificate. The route spec does show some fields being generated by openshift-route, but it's not complete. For example if I deploy this route:
and then use
I have no idea what's the problem. Please help. If you need more info please let me know. |
@ctml91 and I check the audit log and there seems to be no specific info regarding the route. Everything is pretty general. |
Can you gather the logs again from the controller, etc.?
|
Hi @ctrought $ oc get issuers -n default
$ oc get certificaterequests -n default
$ oc describe certificaterequest
$ oc get events -n default
$ oc get events -n cert-manager
$ oc logs -n cert-manager
$ oc logs -n cert-manager
|
|
@ctrought any idea what could be the problem? Thanks! |
I just realized that openshift-routes is not compatible with cert-manager's SelfSigned issuer at the moment. The SelfSigned issuer requires the private key to be stored in a Secret resource and requires the special annotation Usually, cert-manager creates this annotation when it creates the CertificateRequest. But since openshift-routes is the one that creates the CertificateRequest and openshift-routes doesn't know that the issuer is the SelfSigned issuer, it doesn't add the annotation and doesn't create the Secret. I think we need to mention this limitation in the README! 😅 |
Hi, I'm trying to install a route of edge termination using cert-manager annotations in openshift cluster (crc), this is part of our operator's reconcile loop. The following annotations are added to the route:
The dump of the full Route spec:
However the route is not created. I dumped the openshift-route pod's log and I see something is going on but no obvious error messages. I'll attach the log. My environment is
I'll attach also the output of
oc events
to provide more information.Please help. Thanks!
oc_events.log
openshift-routes-pod.log
The text was updated successfully, but these errors were encountered: