hetznercloud / hcloud-cloud-controller-manager

Kubernetes cloud-controller-manager for Hetzner Cloud
Apache License 2.0
743 stars 118 forks source link

ci: fix flaky e2e tests by colocating registry & hccm #687

Closed apricote closed 4 months ago

apricote commented 4 months ago

In our dev/test environment we deploy a container registry to the cluster and push our image there to avoid a dependency on external registries.

To pull from the registry, containerd is instructed to use the service IP. This IP is resolved to the Pod IP in kube-proxy. The CNI is then responsible for making a connection to the Pod IP.

In our case we have the CNI configured to use the Cloud Routes for accessing the Pod IPs from other nodes. This is only being setup by HCCM, which is a problem if we need the routes for pulling the HCCM container image.

This fixes the circular dependency by running HCCM on the same node as the registry. That way no external routes are required and the traffic stays on the same node.

This is not a problem on clusters where HCCM is pulled from an external registry or where the routes controller is not used.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 72.26%. Comparing base (1a8ea95) to head (1a2eddf).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #687 +/- ## ========================================== + Coverage 72.16% 72.26% +0.09% ========================================== Files 31 32 +1 Lines 2497 2668 +171 ========================================== + Hits 1802 1928 +126 - Misses 523 552 +29 - Partials 172 188 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.