eventing-kafka-broker: E2E common setup does not wait for cert manager to become ready

Describe the bug Currently, in e2e-common.sh, we apply the third_party/cert-manager resources to the cluster, but we do not wait for them to become ready. This can lead to errors that look like:

Error from server (InternalError): error when creating "./third_party/eventing-latest//eventing-tls-networking.yaml": Internal error occurred: failed calling webhook "webhook.cert-manager.io": failed to call webhook: Post "https://cert-manager-webhook.cert-manager.svc:443/mutate?timeout=10s": dial tcp 10.111.19.84:443: connect: connection refused

Expected behavior The setup code should wait until all the cert-manager pods are ready before applying the eventing-tls-networking.yaml file.

To Reproduce In a new cluster without cert-manager run ./hack/run.sh deploy-infra. It is a race condition, so you may need to try a few times (but make sure you don’t have cert-manager in your cluster if you are trying again)

Recommended Approach Use wait_until_pods_running function to wait for all cert-manager pods to be running. An example of this in the kafka namespace can be seen here

Additional context

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (19 by maintainers)

Most upvoted comments

@Rahul-Kumar-prog you need to run minikube delete to delete your cluster, and then you should be able to re-create it with minikube start