Skip to content

Commit 802ed34

Browse files
authored
chore: requeue immidiately after creating role (#165)
Description of changes: Currently, after a role is created, we set the synced condition to false, causing the controller to requeue the resource and process any updates in 30 seconds (default requeue on non synced resource) This is not an ideal use case for users who have thousands of resources, and don't want to wait long for their resources to be processed/ready. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 22015a6 commit 802ed34

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/resource/role/sdk.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/hooks/role/sdk_create_post_set_output.go.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
ko.Spec.AssumeRolePolicyDocument = &doc
66
}
77
}
8-
ackcondition.SetSynced(&resource{ko}, corev1.ConditionFalse, nil, nil)
8+
return &resource{ko}, ackrequeue.Needed(fmt.Errorf("role created, requeuing to trigger updates"))

0 commit comments

Comments
 (0)