Skip to content

Commit ba369ba

Browse files
authored
use common runtime condition package (#7)
Replaces the copied-from-rds-controller custom conditions.go file with the common ACK runtime pkg/condition calls. Signed-off-by: Jay Pipes <[email protected]> By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 47bfd8e commit ba369ba

File tree

5 files changed

+7
-109
lines changed

5 files changed

+7
-109
lines changed

pkg/resource/domain/conditions.go

Lines changed: 0 additions & 102 deletions
This file was deleted.

pkg/resource/domain/sdk.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
if domainProcessing(&resource{ko}) {
22
// Setting resource synced condition to false will trigger a requeue of
33
// the resource. No need to return a requeue error here.
4-
setSyncedCondition(&resource{ko}, corev1.ConditionFalse, nil, nil)
4+
ackcondition.SetSynced(&resource{ko}, corev1.ConditionFalse, nil, nil)
55
return &resource{ko}, nil
66
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
if domainProcessing(&resource{ko}) {
22
// Setting resource synced condition to false will trigger a requeue of
33
// the resource. No need to return a requeue error here.
4-
setSyncedCondition(&resource{ko}, corev1.ConditionFalse, nil, nil)
4+
ackcondition.SetSynced(&resource{ko}, corev1.ConditionFalse, nil, nil)
55
} else {
6-
setSyncedCondition(&resource{ko}, corev1.ConditionTrue, nil, nil)
6+
ackcondition.SetSynced(&resource{ko}, corev1.ConditionTrue, nil, nil)
77
}
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
if domainProcessing(latest) {
22
msg := "Cannot modify domain while configuration processing"
3-
setSyncedCondition(desired, corev1.ConditionFalse, &msg, nil)
3+
ackcondition.SetSynced(desired, corev1.ConditionFalse, &msg, nil)
44
return desired, requeueWaitWhileProcessing
55
}

0 commit comments

Comments
 (0)