Skip to content

Commit 86a55b8

Browse files
committed
fix remote object sync by multiple Storage and Database objects (#195)
1 parent 36828d2 commit 86a55b8

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

deploy/ydb-operator/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.5.5
18+
version: 0.5.6
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "0.5.5"
24+
appVersion: "0.5.6"

internal/controllers/remotestoragenodeset/sync.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,23 @@ func (r *Reconciler) updateRemoteStatus(
163163
"ControllerError",
164164
fmt.Sprintf("Failed to update status: %s", err),
165165
)
166+
166167
return Stop, ctrl.Result{RequeueAfter: DefaultRequeueDelay}, err
167168
}
168169

170+
r.Recorder.Event(
171+
remoteStorageNodeSet,
172+
corev1.EventTypeNormal,
173+
"StatusChanged",
174+
"Status updated on remote cluster",
175+
)
176+
r.RemoteRecorder.Event(
177+
remoteStorageNodeSet,
178+
corev1.EventTypeNormal,
179+
"StatusChanged",
180+
"Status updated",
181+
)
182+
169183
r.Log.Info("complete step updateRemoteStatus")
170184
return Continue, ctrl.Result{}, nil
171185
}

internal/resources/remotedatabasenodeset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func (b *RemoteDatabaseNodeSetResource) UpdateRemoteResourceStatus(
218218
Type: RemoteResourceSyncedCondition,
219219
Status: metav1.ConditionTrue,
220220
Reason: ReasonCompleted,
221-
Message: fmt.Sprintf("Sucessfully synced remoteObject to resourceVersion %s", resourceVersion),
221+
Message: fmt.Sprintf("Successfully synced remoteObject to resourceVersion %s", resourceVersion),
222222
})
223223
remoteResource.State = ResourceSyncSuccess
224224
}

internal/resources/remotestoragenodeset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func (b *RemoteStorageNodeSetResource) UpdateRemoteResourceStatus(
207207
Type: RemoteResourceSyncedCondition,
208208
Status: metav1.ConditionTrue,
209209
Reason: ReasonCompleted,
210-
Message: fmt.Sprintf("Sucessfully synced remoteObject to resourceVersion %s", resourceVersion),
210+
Message: fmt.Sprintf("Successfully synced remoteObject to resourceVersion %s", resourceVersion),
211211
})
212212
remoteResource.State = ResourceSyncSuccess
213213
}

0 commit comments

Comments
 (0)