Skip to content

Conversation

@guettli
Copy link
Collaborator

@guettli guettli commented Nov 17, 2025

HCloud PR

Deprecated: This field is deprecated and is
going to be removed when support for v1beta1
will be dropped. Please see
https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md
for more details.

Related Baremetal PR 1716

Changes:

  • Extracted function SetErrorAndRemediateMachine(), so that it can be used without a MachineScope (for example in a test).
  • Do not reconcile hbmm, when RemediateMachineAnnotation is set (except the hbmm gets deleted).
  • In test: set PlacementGroupName: &defaultPlacementGroupName. Otherwise, machine would not get provisioned (in test).
  • added test: It("should delete machine if SetErrorAndRemediate() was called" ...
  • tests: removed machinePatchHelper, because it was not used.
  • Reconcile of hcloud remediation: Do not try to reboot, when NoRemediateMachineAnnotationCondition is set. Use setOwnerRemediatedConditionToFailed() and stop reconciling.
  • Reconcile of hcloud remediation: Better err msg to differentiate between ProviderId is not set and server-not-found.
  • Avoid using named returns, when not needed: return res, nil --> return reconcile.Result{}, nil
  • Better err msg when a PlacementGroup does not exist.
  • create server: Align message in condition to message in error.
  • avoid using capierrors (will be removed in future versions of capi).
  • test: ensure RemediateMachineAnnotation is set.
  • tests: align capi-machine name to hbmm name.
  • Add helper noErrorOccured() to check that machineScope contains no error.

> Deprecated: This field is deprecated and is
> going to be removed when support for v1beta1
> will be dropped. Please see
> https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md
> for more details.
@github-actions github-actions bot added size/M Denotes a PR that changes 50-200 lines, ignoring generated files. area/test Changes made in the test directory area/code Changes made in the code directory area/api Changes made in the api directory labels Nov 17, 2025
@github-actions github-actions bot added size/L Denotes a PR that changes 200-800 lines, ignoring generated files. and removed size/M Denotes a PR that changes 50-200 lines, ignoring generated files. labels Nov 25, 2025
@guettli guettli requested a review from janiskemper December 2, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api Changes made in the api directory area/code Changes made in the code directory area/test Changes made in the test directory size/L Denotes a PR that changes 200-800 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants