✨ v1.2.x with APIVersion v1beta2#1760
Open
guettli wants to merge 12 commits intov1.2.x-v1beta2-vendor-dirfrom
Open
✨ v1.2.x with APIVersion v1beta2#1760guettli wants to merge 12 commits intov1.2.x-v1beta2-vendor-dirfrom
guettli wants to merge 12 commits intov1.2.x-v1beta2-vendor-dirfrom
Conversation
8f9488b to
01420fc
Compare
This PR exists, so that the v1.2.x-v1beta2 PR does not contain the changes in the vendor directory. Otherwise the PR is so big, that it using the Github UI is almost not possible. This PR was created to keep v1.2.x-v1beta2 PR small.
456332e to
40577e6
Compare
ca33cb7 to
a276fe8
Compare
guettli
commented
Dec 23, 2025
| return sts.IPv4 | ||
| } | ||
|
|
||
| // HasFatalError returns true, if the corresponding capi machine should get deleted. |
guettli
commented
Dec 23, 2025
| HCloudBootStateBootingToRealOS HCloudBootState = "BootingToRealOS" | ||
|
|
||
| // HCloudBootStateOperatingSystemRunning indicates that the server is successfully running. | ||
| HCloudBootStateOperatingSystemRunning HCloudBootState = "OperatingSystemRunning" |
Collaborator
Author
There was a problem hiding this comment.
ProvisioningFailed is missing.
guettli
commented
Dec 23, 2025
| event := eventList.Items[i] | ||
| if event.Reason == reason && | ||
| event.InvolvedObject.Name == involvedObjectName && | ||
| strings.Contains(event.Message, message) { |
guettli
commented
Dec 23, 2025
| if c != nil && c.Status == metav1.ConditionFalse { | ||
| // This hcloud machine will be removed soon. | ||
| log.Info("hcloudmachine: ProvisioningFailed. Not reconciling this machine.") | ||
| log.Info("hcloudmachine has DeleteMachineSucceededCondition. Not reconciling this machine.") |
guettli
commented
Dec 23, 2025
| It("should delete machine if SetErrorAndRemediate() was called", func() { | ||
| By("Creating Server") | ||
|
|
||
| By("Checking Environment") |
guettli
commented
Dec 23, 2025
| }).Should(Succeed()) | ||
|
|
||
| By("Call SetRemediateMachineAnnotationToDeleteMachine") | ||
| By("Call SetErrorAndRemediateMachine") |
guettli
commented
Dec 23, 2025
| return ctrl.Result{RequeueAfter: 30 * time.Second}, nil | ||
| } | ||
|
|
||
| // Mirror DeleteMachineSucceededCondition from hbmm to hbmh. |
guettli
commented
Dec 23, 2025
| return r.reconcileDelete(ctx, machineScope) | ||
| } | ||
|
|
||
| deleteConditionOfHbmm := conditions.Get(hbmMachine, infrav1.DeleteMachineSucceededCondition) |
guettli
commented
Dec 23, 2025
| secretManager := secretutil.NewSecretManager(clusterScope.Logger, r.Client, r.APIReader) | ||
| // Remove finalizer of secret | ||
| if err := secretManager.ReleaseSecret(ctx, clusterScope.HetznerSecret(), clusterScope.HetznerCluster); err != nil { | ||
| if apierrors.IsConflict(err) { |
guettli
commented
Dec 23, 2025
| make kustomize | ||
| fi | ||
|
|
||
| hack/ensure-ssh-key-in-hcloud.py |
guettli
commented
Dec 23, 2025
| @@ -1,120 +0,0 @@ | |||
| #!/usr/bin/env python3 | |||
guettli
commented
Dec 23, 2025
| @@ -24,10 +24,6 @@ K8S_VERSION=v1.33.0 | |||
| REPO_ROOT=$(git rev-parse --show-toplevel) | |||
guettli
commented
Dec 23, 2025
| // | ||
| // Background: the hbmm/hbmh controller has no permission to delete a capi machine. That's why this | ||
| // extra step (via remediate-machine annotation) is needed. | ||
| func (m *BareMetalMachineScope) SetRemediateMachineAnnotationToDeleteMachine(ctx context.Context, message string) error { |
guettli
commented
Dec 23, 2025
| conditions.MarkTrue(s.scope.BareMetalMachine, infrav1.HostAssociateSucceededCondition) | ||
|
|
||
| // update the machine | ||
| host, err := s.update(ctx) |
guettli
commented
Dec 23, 2025
| return checkForRequeueError(err, "failed to update machine") | ||
| } | ||
|
|
||
| if host.Spec.Status.HasFatalError() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
v1.2.x with APIVersion v1beta2
This PR will update CAPH to support beta2 of CAPI.
Previous PR: #1775
TODO
todo: The Caph Compatibility Table is duplicated:
In introduction.md (visible on syself.com)
https://syself.com/docs/caph/getting-started/introduction#compatibility-with-cluster-api-and-kubernetes-versions
source
In README.md (visible on Github)
README.md
todo: Check docs about upgrade, and table with supported versions (v1.0.x -- capi-versions, v1.1.x -- capi-versions)