Skip to content
This repository was archived by the owner on Dec 16, 2025. It is now read-only.

Commit ca12d60

Browse files
Apply suggestions from code review
Co-authored-by: janiskemper <[email protected]> Signed-off-by: Matej Feder <[email protected]>
1 parent ba399a1 commit ca12d60

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Get the latest CSPO release version and apply CSPO manifests to the management c
9393
# Get the latest CSPO release version
9494
CSPO_VERSION=$(curl https://api.github.com/repos/SovereignCloudStack/cluster-stack-provider-openstack/releases/latest -s | jq .name -r)
9595
# Apply CSPO manifests
96-
curl -sSL https://github.com/sovereignCloudStack/cluster-stack-provider-openstack/releases/download/${CSPO_VERSION}/cspo-infrastructure-components.yaml | /tmp/envsubst | kubectl apply -f -
96+
curl -sSL https://github.com/SovereignCloudStack/cluster-stack-provider-openstack/releases/download/${CSPO_VERSION}/cspo-infrastructure-components.yaml | /tmp/envsubst | kubectl apply -f -
9797
```
9898

9999
## Create the workload cluster

api/v1alpha1/conditions_const.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222

2323
const (
2424
// ClusterStackReleaseAssetsReadyCondition reports on whether the download of cluster stack release assets is complete.
25-
ClusterStackReleaseAssetsReadyCondition clusterv1beta1.ConditionType = "ClusterStackReleaseDownloaded"
25+
ClusterStackReleaseAssetsReadyCondition clusterv1beta1.ConditionType = "ClusterStackReleaseAssetsReady"
2626

2727
// ReleaseAssetsNotDownloadedYetReason is used when release assets are not yet downloaded.
2828
ReleaseAssetsNotDownloadedYetReason = "ReleaseAssetsNotDownloadedYet"
@@ -64,8 +64,8 @@ const (
6464
)
6565

6666
const (
67-
// OpenStackImageImportStartCondition reports the image import start.
68-
OpenStackImageImportStartCondition = "OpenStackImageImportStart"
67+
// OpenStackImageImportStartedCondition reports the image import starts.
68+
OpenStackImageImportStartedCondition = "OpenStackImageImportStarted"
6969

7070
// OpenStackImageImportNotStartReason is used when image import does not start yet.
7171
OpenStackImageImportNotStartReason = "OpenStackImageImportNotStartReason"

api/v1alpha1/openstackclusterstackrelease_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727

2828
// OpenStackClusterStackReleaseSpec defines the desired state of OpenStackClusterStackRelease.
2929
type OpenStackClusterStackReleaseSpec struct {
30-
// The name of the cloud to use from the clouds secret
30+
// CloudName is the name of the cloud to use from the cloud's secret.
3131
CloudName string `json:"cloudName"`
3232
// IdentityRef is a reference to a identity to be used when reconciling this cluster
3333
IdentityRef *apiv1alpha7.OpenStackIdentityReference `json:"identityRef"`

api/v1alpha1/openstacknodeimagerelease_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828

2929
// OpenStackNodeImageReleaseSpec defines the desired state of OpenStackNodeImageRelease.
3030
type OpenStackNodeImageReleaseSpec struct {
31-
// The name of the cloud to use from the clouds secret
31+
// CloudName is the name of the cloud to use from the cloud's secret.
3232
CloudName string `json:"cloudName"`
3333
// IdentityRef is a reference to a identity to be used when reconciling this cluster
3434
IdentityRef *apiv1alpha7.OpenStackIdentityReference `json:"identityRef"`

internal/controller/openstacknodeimagerelease_controller.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (r *OpenStackNodeImageReleaseReconciler) Reconcile(ctx context.Context, req
144144

145145
if imageID == "" {
146146
conditions.MarkFalse(openstacknodeimagerelease, apiv1alpha1.OpenStackImageReadyCondition, apiv1alpha1.OpenStackImageNotCreatedYetReason, clusterv1beta1.ConditionSeverityInfo, "image is not created yet")
147-
conditions.MarkFalse(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartCondition, apiv1alpha1.OpenStackImageImportNotStartReason, clusterv1beta1.ConditionSeverityInfo, "image import not start yet")
147+
conditions.MarkFalse(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartedCondition, apiv1alpha1.OpenStackImageImportNotStartReason, clusterv1beta1.ConditionSeverityInfo, "image import not start yet")
148148
openstacknodeimagerelease.Status.Ready = false
149149

150150
imageCreateOpts := openstacknodeimagerelease.Spec.Image.CreateOpts
@@ -174,8 +174,8 @@ func (r *OpenStackNodeImageReleaseReconciler) Reconcile(ctx context.Context, req
174174
return ctrl.Result{}, fmt.Errorf("failed to import an image: %w", err)
175175
}
176176

177-
conditions.MarkTrue(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartCondition)
178-
// requeue to make sure that image ID can be find by image name
177+
conditions.MarkTrue(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartedCondition)
178+
// requeue to make sure that image ID can be found via image name
179179
return ctrl.Result{Requeue: true}, nil
180180
}
181181

@@ -192,9 +192,9 @@ func (r *OpenStackNodeImageReleaseReconciler) Reconcile(ctx context.Context, req
192192
}
193193

194194
// Check wait for image ACTIVE status duration
195-
if r.WaitForImageBecomeActiveMinutes > 0 && conditions.IsTrue(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartCondition) {
195+
if r.WaitForImageBecomeActiveMinutes > 0 && conditions.IsTrue(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartedCondition) {
196196
// Calculate elapsed time since the OpenStackImageImportStartCondition is true
197-
startTime := conditions.GetLastTransitionTime(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartCondition)
197+
startTime := conditions.GetLastTransitionTime(openstacknodeimagerelease, apiv1alpha1.OpenStackImageImportStartedCondition)
198198
elapsedTime := time.Since(startTime.Time)
199199

200200
waitForImageBecomeActiveTimeout := time.Duration(r.WaitForImageBecomeActiveMinutes) * time.Minute

0 commit comments

Comments
 (0)