From 2eb2f7f464e97a1965908a0ad0640ec5d3814737 Mon Sep 17 00:00:00 2001 From: Thomas Guettler Date: Fri, 15 Dec 2023 11:03:18 +0100 Subject: [PATCH] :seedling: better error message if secret for BM is missing. --- controllers/hetznerbaremetalhost_controller.go | 5 +++-- docs/developers/releasing.md | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/controllers/hetznerbaremetalhost_controller.go b/controllers/hetznerbaremetalhost_controller.go index 66d26a747..9fe45249e 100644 --- a/controllers/hetznerbaremetalhost_controller.go +++ b/controllers/hetznerbaremetalhost_controller.go @@ -218,14 +218,15 @@ func (r *HetznerBareMetalHostReconciler) getSecrets( osSSHSecret, err = secretManager.ObtainSecret(ctx, osSSHSecretNamespacedName) if err != nil { if apierrors.IsNotFound(err) { + msg := fmt.Sprintf("%s: %s", infrav1.ErrorMessageMissingOSSSHSecret, err.Error()) conditions.MarkFalse( bmHost, infrav1.CredentialsAvailableCondition, infrav1.OSSSHSecretMissingReason, clusterv1.ConditionSeverityError, - infrav1.ErrorMessageMissingOSSSHSecret, + msg, ) - record.Warnf(bmHost, infrav1.OSSSHSecretMissingReason, infrav1.ErrorMessageMissingOSSSHSecret) + record.Warnf(bmHost, infrav1.OSSSHSecretMissingReason, msg) conditions.SetSummary(bmHost) result, err := host.SaveHostAndReturn(ctx, r.Client, bmHost) if result != emptyResult || err != nil { diff --git a/docs/developers/releasing.md b/docs/developers/releasing.md index a94569994..a9e6b593a 100644 --- a/docs/developers/releasing.md +++ b/docs/developers/releasing.md @@ -4,6 +4,7 @@ 1. Create an annotated tag - `git switch main` + - `git pull` - Have a look at the current (old) version: [Github Releases](https://github.com/syself/cluster-api-provider-hetzner/releases) - `export RELEASE_TAG=` (eg. `export RELEASE_TAG=v1.0.1`) - `git tag -a ${RELEASE_TAG} -m ${RELEASE_TAG}` @@ -18,6 +19,7 @@ 1. If it is pre-release, activate the corresponding check at the bottom of the page. And add `:rotating_light: This is a RELEASE CANDIDATE. If you find any bugs, file an [issue](https://github.com/syself/cluster-api-provider-hetzner/issues/new).` at the top of the release notes. 1. Before publishing you can check the [Recent tagged image versions](https://github.com/syself/cluster-api-provider-hetzner/pkgs/container/caph): "latest" should be some seconds old and the new version number. 1. Publish the release +1. Write to the corresponding channels: "FYI: .... was released, (add hyperlink). A big "thank you" to all contributors!" Done 🥳