nutanix-cloud-native / cluster-api-provider-nutanix

Kubernetes-native declarative infrastructure provider for Nutanix AHV
https://opendocs.nutanix.com/capx/latest/getting_started/
Apache License 2.0
41 stars 22 forks source link

fix(controller): Move v4 client instantiation to reconcileDelete #465

Closed thunderboltsid closed 3 months ago

thunderboltsid commented 3 months ago

In order to reduce the number of calls made to /prism_central to establish whether a v4 client can be created, we move the v4 client creation to reconcileDelete function as currently that's the only place where we need to make v4 VG detach calls. This ensures we don't impact the regular reconcile cycle and all the new calls only take place on the delete path.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 7.81250% with 59 lines in your changes missing coverage. Please review.

Project coverage is 31.14%. Comparing base (fb76b4f) to head (68e55a6).

Files Patch % Lines
controllers/nutanixmachine_controller.go 7.81% 59 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #465 +/- ## ========================================== + Coverage 29.33% 31.14% +1.80% ========================================== Files 14 14 Lines 1476 1477 +1 ========================================== + Hits 433 460 +27 + Misses 1043 1017 -26 ```

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