Skip to content

Commit

Permalink
Merge pull request #1091 from syself/tg/better-err-msg-if-bm-secret-i…
Browse files Browse the repository at this point in the history
…s-missing

🌱 better error message if secret for BM is missing.
  • Loading branch information
guettli authored Dec 19, 2023
2 parents cd51a19 + 2eb2f7f commit 4876bc1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/hetznerbaremetalhost_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions docs/developers/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<the tag of the release to be cut>` (eg. `export RELEASE_TAG=v1.0.1`)
- `git tag -a ${RELEASE_TAG} -m ${RELEASE_TAG}`
Expand All @@ -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 🥳

Expand Down

0 comments on commit 4876bc1

Please sign in to comment.