Skip to content

Commit

Permalink
Allow storage update operation to unavailable db instance
Browse files Browse the repository at this point in the history
With this change we allow the controller to make a storage update
call when the DB instance is unavailable due to a `storage-full` status.
  • Loading branch information
michaelhtm committed Nov 25, 2024
1 parent ee3d577 commit 0c957f4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apis/v1alpha1/ack-generate-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ack_generate_info:
build_date: "2024-10-10T04:05:06Z"
build_date: "2024-11-25T17:27:34Z"
build_hash: 36c2d234498c2bc4f60773ab8df632af4067f43b
go_version: go1.23.2
version: v0.39.1
Expand Down
2 changes: 1 addition & 1 deletion pkg/resource/db_instance/sdk.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
ackcondition.SetSynced(desired, corev1.ConditionTrue, nil, nil)
return desired, nil
}
if !instanceAvailable(latest) {
if !instanceAvailable(latest) && !strings.Contains(*latest.ko.Status.DBInstanceStatus, "storage-full") && !delta.DifferentAt("Spec.AllocatedStorage") {
msg := "DB instance cannot be modifed while in '" + *latest.ko.Status.DBInstanceStatus + "' status"
ackcondition.SetSynced(desired, corev1.ConditionFalse, &msg, nil)
return desired, requeueWaitUntilCanModify(latest)
Expand Down

0 comments on commit 0c957f4

Please sign in to comment.