Skip to content

Commit c1fd49c

Browse files
wikkykclaude
andcommitted
fixup! fix: use distinct condition reason for credentials secret errors
keep ProxmoxUnreachableReason with original value; use for non-NotFound errors Restore ProxmoxUnreachableReason as its own constant with the original "ProxmoxUnreachable" string value (not a deprecated alias). Use it in reconcileNormalCredentialsSecret for non-NotFound errors (RBAC, network, patch conflicts). CredentialsNotFound is reserved for actual missing secrets. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 105ffe9 commit c1fd49c

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

api/v1alpha2/conditions_consts.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ const (
2727
// underlying Proxmox infrastructure used by the ProxmoxCluster.
2828
ProxmoxClusterProxmoxAvailableCondition = "ProxmoxAvailable"
2929

30+
// ProxmoxClusterProxmoxAvailableProxmoxUnreachableReason documents a controller
31+
// detecting issues with Proxmox reachability.
32+
ProxmoxClusterProxmoxAvailableProxmoxUnreachableReason = "ProxmoxUnreachable"
33+
3034
// ProxmoxClusterProxmoxAvailableCredentialsNotFoundReason documents a controller
3135
// detecting that credentials are unavailable because spec.credentialsRef is
3236
// not set or the referenced credentials secret was not found.
3337
ProxmoxClusterProxmoxAvailableCredentialsNotFoundReason = "CredentialsNotFound"
3438

35-
// Deprecated: use ProxmoxClusterProxmoxAvailableCredentialsNotFoundReason instead.
36-
// ProxmoxClusterProxmoxAvailableProxmoxUnreachableReason is kept as an alias for
37-
// backwards compatibility with downstream consumers of the v1alpha2 Go API.
38-
ProxmoxClusterProxmoxAvailableProxmoxUnreachableReason = ProxmoxClusterProxmoxAvailableCredentialsNotFoundReason
3939
// ProxmoxClusterProxmoxAvailableMissingControlPlaneEndpointReason documents a
4040
// missing Control Plane endpoint when the cluster uses an externally managed
4141
// control plane.

internal/controller/proxmoxcluster_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (r *ProxmoxClusterReconciler) reconcileNormal(ctx context.Context, clusterS
216216
}
217217

218218
if err := r.reconcileNormalCredentialsSecret(ctx, clusterScope); err != nil {
219-
reason := clusterv1.InternalErrorReason
219+
reason := infrav1.ProxmoxClusterProxmoxAvailableProxmoxUnreachableReason
220220
if apierrors.IsNotFound(err) {
221221
reason = infrav1.ProxmoxClusterProxmoxAvailableCredentialsNotFoundReason
222222
}

0 commit comments

Comments
 (0)