Skip to content

Conversation

@guettli
Copy link
Collaborator

@guettli guettli commented Jul 10, 2025

Based on PR of @cgroschupp 🌱 update controller runtime and cluster-api to newest version by cgroschupp · Pull Request #1623 · syself/cluster-api-provider-hetzner

closes #1662

Changes

Use separate struct for webhooks, and do not export them. Example:

- var _ webhook.Defaulter = &HCloudRemediation{}
+ var _ webhook.CustomDefaulter = &hcloudRemediationWebhook{}

Followed the capi deprecation:

// Deprecated: This predicate is deprecated and will be removed in a future version,
// use ClusterPausedTransitionsOrInfrastructureReady instead.

Use docker image of Lychee (do not install it via alpine)

FROM docker.io/lycheeverse/lychee:sha-3592972-alpine@sha256:6609738da2ce125c64658728bd6af93da45852e0744e3335e90c5a5719e080c1 as lychee


CloudInitStatus: Do now hide the underlaying error, when calling cloud-init status failed.

There are three cases:

  • command was never called (for example host/port not reachable)
  • command was called, but exit was non-zero
  • command was called and exit was zero. Only in this case it makes sense that the code analyzes the output of the command.

Caller of CloudInitStatus() uses output.ExitStatus() now.


GetCloudInitOutput: Same as for CloudInitStatus: Use output.ExitStatus() to differentiate between error cases.


obtainHardwareDetailsNics: Fail, if no IP was found.


Avoid && in shell commands.

Related: guettli/bash-strict-mode: Bash Strict Mode

Example:

apt-get update && apt-get install -y cloud-init apparmor apparmor-utils

Was changed to:

apt-get update
apt-get install -y cloud-init apparmor apparmor-utils

BTW, it took some time to understand why cloud-init was not installed. The && made the failing apt-get update not terminate the script. Additionally, the error output was swallowed. That was the reason for refactoring to use output.ExitStatus().


fix: input.ClusterctlConfigPath is required for DumpAllResources


fix: input.KubeConfigPath is required for DumpAllResources


fix: action "ensure-provisioned" failed: failed to get cloud init output: %!w()' (show real error message now)


updated cilium


Regenerated the cillium and ccm e2e templates


logStatusContinuously():

Show conditions of the wl-clusters.

This is very helpful, as you can see while the e2e test is running, if an error occurs.


@github-actions github-actions bot added size/L Denotes a PR that changes 200-800 lines, ignoring generated files. area/hack Changes made in the hack directory 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 Jul 10, 2025
@github-actions github-actions bot added the area/github Changes made in the github directory label Jul 10, 2025
guettli and others added 14 commits July 10, 2025 13:55
…1635)

build(tools): make helm and hcloud downloads platform-agnostic

Replace hardcoded `linux-amd64` architecture with dynamic `$(go env GOOS)-$(go env GOARCH)` to support multiple platforms and architectures during tool installation.

Signed-off-by: Tomas Dabašinskas <tomas.dabasinskas@datolabs.io>
…1637)

* 🌱 Add SkipCreatingHetznerSecretInWorkloadCluster to hetznercluster_controller

SkipCreatingHetznerSecretInWorkloadCluster indicates whether the Hetzner secret should be created in the workload cluster. By default the secret gets created, so that the ccm (running in the wl-cluster) can use that secret. If you prefer to not reveal the secret in the workload cluster, you can set this to value to false, so that the secret is not created. Be sure to run the ccm outside of the workload cluster in that case, e.g. in the management cluster.

Closes #1636
@guettli guettli requested a review from janiskemper September 15, 2025 16:48
@github-actions github-actions bot added size/L Denotes a PR that changes 200-800 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 800-2000 lines, ignoring generated files. labels Sep 17, 2025
@github-actions github-actions bot added size/XL Denotes a PR that changes 800-2000 lines, ignoring generated files. and removed size/L Denotes a PR that changes 200-800 lines, ignoring generated files. labels Sep 17, 2025
janiskemper
janiskemper previously approved these changes Sep 17, 2025
Copy link
Contributor

@janiskemper janiskemper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot review the changes in the scripts though

@github-actions github-actions bot added size/L Denotes a PR that changes 200-800 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 800-2000 lines, ignoring generated files. labels Sep 17, 2025
@guettli
Copy link
Collaborator Author

guettli commented Sep 17, 2025

I cannot review the changes in the scripts though

I am unsure what you mean. I only see && updated, so that there are two lines now. This intentional.

@guettli guettli requested a review from janiskemper September 17, 2025 10:19
@guettli guettli merged commit 95c1b7f into main Sep 17, 2025
10 of 12 checks passed
@guettli guettli deleted the update-controller-runtime branch September 17, 2025 13:58
@guettli
Copy link
Collaborator Author

guettli commented Sep 17, 2025

@cgroschupp thank you for your initial work. The PR is now merged. We will do a new release, when #1647 got merged.

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/github Changes made in the github directory area/hack Changes made in the hack directory area/templates Changes made in the templates 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.

Update controller runtime and cluster-api to the newest version (CAPI 1.10)

5 participants