Skip to content

Commit 0dacccf

Browse files
committed
review fixes
1 parent ff0d77d commit 0dacccf

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

apis/v1beta1/vsphereclusteridentity_types.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ const (
3939
// VSphereClusterIdentityCredentialsSecretNotAvailableV1Beta2Reason surfaces when the VSphereClusterIdentity secret is not available.
4040
VSphereClusterIdentityCredentialsSecretNotAvailableV1Beta2Reason = "SecretNotAvailable"
4141

42-
// VSphereClusterIdentityCredentialsAvailableV1Beta2Reason surfaces when the VSphereClusterIdentity secret is already in use.
42+
// VSphereClusterIdentityCredentialsSecretAlreadyInUseV1Beta2Reason surfaces when the VSphereClusterIdentity secret is already in use.
4343
VSphereClusterIdentityCredentialsSecretAlreadyInUseV1Beta2Reason = "SecretAlreadyInUse"
4444

45-
// VSphereClusterIdentityCredentialsAvailableV1Beta2Reason surfaces when setting the owner reference on the VSphereClusterIdentity secret failed.
46-
VSphereClusterIdentityCredentialsSecretOwnerReferenceFailedV1Beta2Reason = "SecretOwnerReferenceFailed"
45+
// VSphereClusterIdentityCredentialsSettingSecretOwnerReferenceFailedV1Beta2Reason surfaces when setting the owner reference on the VSphereClusterIdentity secret failed.
46+
VSphereClusterIdentityCredentialsSettingSecretOwnerReferenceFailedV1Beta2Reason = "SettingSecretOwnerReferenceFailed"
4747

4848
// VSphereClusterIdentityCredentialsDeletingV1Beta2Reason surfaces when the credentials for a VSphereClusterIdentity are being deleted.
4949
VSphereClusterIdentityCredentialsDeletingV1Beta2Reason = clusterv1.DeletingV1Beta2Reason
@@ -80,7 +80,7 @@ type VSphereClusterIdentityStatus struct {
8080
// See https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/proposals/20240916-improve-status-in-CAPI-resources.md for more context.
8181
type VSphereClusterIdentityV1Beta2Status struct {
8282
// conditions represents the observations of a VSphereClusterIdentity's current state.
83-
// Known condition types are Paused.
83+
// Known condition types are CredentialsAvailable and Paused.
8484
// +optional
8585
// +listType=map
8686
// +listMapKey=type

apis/v1beta1/vspheredeploymentzone_types.go

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,10 @@ const (
6868
// VSphereDeploymentZonePlacementConstraintReadyV1Beta2Reason surfaces when the placement status for a VSphereDeploymentZone is ready.
6969
VSphereDeploymentZonePlacementConstraintReadyV1Beta2Reason = clusterv1.ReadyV1Beta2Reason
7070

71-
// VSphereDeploymentZonePlacementConstraintVCenterNotAvailableV1Beta2Reason surfaces when the placement constraint for a VSphereDeploymentZone
72-
// can't be verified because of no connectivity to VCenter.
73-
VSphereDeploymentZonePlacementConstraintVCenterNotAvailableV1Beta2Reason = "VCenterNotAvailable"
74-
7571
// VSphereDeploymentZonePlacementConstraintResourcePoolNotFoundV1Beta2Reason surfaces when the resource pool for a VSphereDeploymentZone is not found.
7672
VSphereDeploymentZonePlacementConstraintResourcePoolNotFoundV1Beta2Reason = "ResourcePoolNotFound"
7773

78-
// VSphereDeploymentZonePlacementConstraintFolderNotFoundV1Beta2Reason surfaces when the resource pool for a VSphereDeploymentZone is not found.
74+
// VSphereDeploymentZonePlacementConstraintFolderNotFoundV1Beta2Reason surfaces when the folder for a VSphereDeploymentZone is not found.
7975
VSphereDeploymentZonePlacementConstraintFolderNotFoundV1Beta2Reason = "FolderNotFound"
8076

8177
// VSphereDeploymentZonePlacementConstraintDeletingV1Beta2Reason surfaces when the VSphereDeploymentZone is being deleted.
@@ -90,10 +86,6 @@ const (
9086
// VSphereDeploymentZoneFailureDomainValidatedV1Beta2Reason surfaces when the failure domain for a VSphereDeploymentZone is validated.
9187
VSphereDeploymentZoneFailureDomainValidatedV1Beta2Reason = "Validated"
9288

93-
// VSphereDeploymentZoneFailureDomainVCenterNotAvailableV1Beta2Reason surfaces when the failure domain for a VSphereDeploymentZone
94-
// can't be validated because of no connectivity to VCenter.
95-
VSphereDeploymentZoneFailureDomainVCenterNotAvailableV1Beta2Reason = "VCenterNotAvailable"
96-
9789
// VSphereDeploymentZoneFailureDomainValidationFailedV1Beta2Reason surfaces when the failure domain's validation for a VSphereDeploymentZone failed.
9890
VSphereDeploymentZoneFailureDomainValidationFailedV1Beta2Reason = "ValidationFailed"
9991

@@ -103,22 +95,22 @@ const (
10395
// VSphereDeploymentZoneFailureDomainZoneMisconfiguredV1Beta2Reason surfaces when the failure domain's zone for a VSphereDeploymentZone is misconfigured.
10496
VSphereDeploymentZoneFailureDomainZoneMisconfiguredV1Beta2Reason = "ZoneMisconfigured"
10597

106-
// VSphereDeploymentZoneFailureDomainZoneMisconfiguredV1Beta2Reason surfaces when the failure domain's hosts for a VSphereDeploymentZone are misconfigured.
98+
// VSphereDeploymentZoneFailureDomainHostsMisconfiguredV1Beta2Reason surfaces when the failure domain's hosts for a VSphereDeploymentZone are misconfigured.
10799
VSphereDeploymentZoneFailureDomainHostsMisconfiguredV1Beta2Reason = "HostsMisconfigured"
108100

109101
// VSphereDeploymentZoneFailureDomainHostsAffinityMisconfiguredV1Beta2Reason surfaces when the failure domain's hosts for a VSphereDeploymentZone are misconfigured.
110102
VSphereDeploymentZoneFailureDomainHostsAffinityMisconfiguredV1Beta2Reason = "HostsAffinityMisconfigured"
111103

112-
// VSphereDeploymentZoneFailureDomainZoneMisconfiguredV1Beta2Reason surfaces when the failure domain's datastore for a VSphereDeploymentZone is not found.
104+
// VSphereDeploymentZoneFailureDomainDatastoreNotFoundV1Beta2Reason surfaces when the failure domain's datastore for a VSphereDeploymentZone is not found.
113105
VSphereDeploymentZoneFailureDomainDatastoreNotFoundV1Beta2Reason = "DatastoreNotFound"
114106

115-
// VSphereDeploymentZoneFailureDomainZoneMisconfiguredV1Beta2Reason surfaces when the failure domain's network for a VSphereDeploymentZone is not found.
107+
// VSphereDeploymentZoneFailureDomainNetworkNotFoundV1Beta2Reason surfaces when the failure domain's network for a VSphereDeploymentZone is not found.
116108
VSphereDeploymentZoneFailureDomainNetworkNotFoundV1Beta2Reason = "NetworkNotFound"
117109

118-
// VSphereDeploymentZoneFailureDomainComputeClusterNotFoundV1Beta2Reason surfaces when the failure domain's compute cluster for a VSphereDeploymentZone failed.
110+
// VSphereDeploymentZoneFailureDomainComputeClusterNotFoundV1Beta2Reason surfaces when the failure domain's compute cluster for a VSphereDeploymentZone is not found.
119111
VSphereDeploymentZoneFailureDomainComputeClusterNotFoundV1Beta2Reason = "ComputeClusterNotFound"
120112

121-
// VSphereDeploymentZoneFailureDomainValidationFailedV1Beta2Reason surfaces when the failure domain's resource pool for a VSphereDeploymentZone failed.
113+
// VSphereDeploymentZoneFailureDomainResourcePoolNotFoundV1Beta2Reason surfaces when the failure domain's resource pool for a VSphereDeploymentZone is not found.
122114
VSphereDeploymentZoneFailureDomainResourcePoolNotFoundV1Beta2Reason = "ResourcePoolNotFound"
123115

124116
// VSphereDeploymentZoneFailureDomainDeletingV1Beta2Reason surfaces when the VSphereDeploymentZone is being deleted.

controllers/vsphereclusteridentity_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (r clusterIdentityReconciler) Reconcile(ctx context.Context, req reconcile.
162162
v1beta2conditions.Set(identity, metav1.Condition{
163163
Type: infrav1.VSphereClusterIdentityCredentialsAvailableV1Beta2Condition,
164164
Status: metav1.ConditionFalse,
165-
Reason: infrav1.VSphereClusterIdentityCredentialsSecretOwnerReferenceFailedV1Beta2Reason,
165+
Reason: infrav1.VSphereClusterIdentityCredentialsSettingSecretOwnerReferenceFailedV1Beta2Reason,
166166
Message: err.Error(),
167167
})
168168
return reconcile.Result{}, err

0 commit comments

Comments
 (0)