-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: EC2 controller for vpcendpoint does not update status (#191)
Issue : aws-controllers-k8s/community#2075 Description of changes: The issue is that vpce CR status is not updated. This happens because when vpce is created, it takes around a minute for it to be created in aws. Due to this, it's status is kept `pending`. But there is no sync enforced on the reconciler. Due to this, reconciliation happens after 10h default time. At this time, status would be set correctly. This fix enforces reconciliation to make sure CR is updated correctly when vpce creation in aws is successful. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
- Loading branch information
Showing
8 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
ack_generate_info: | ||
build_date: "2024-05-02T20:55:46Z" | ||
build_date: "2024-05-22T16:42:26Z" | ||
build_hash: 14cef51778d471698018b6c38b604181a6948248 | ||
go_version: go1.22.0 | ||
go_version: go1.21.1 | ||
version: v0.34.0 | ||
api_directory_checksum: 7fd395ceb7d5d8e35906991c7348d3498f384741 | ||
api_directory_checksum: 1b53401670898ce50e6d6cc8bfba6b63ea7d5683 | ||
api_version: v1alpha1 | ||
aws_sdk_go_version: v1.44.93 | ||
generator_config_info: | ||
file_checksum: 21aa2c0035772a834102dcdac81a186fe148212c | ||
file_checksum: 75820b9d685b38976cd9723a9435f119ab913245 | ||
original_file_name: generator.yaml | ||
last_modification: | ||
reason: API generation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
templates/hooks/vpc_endpoint/sdk_create_post_set_output.go.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
// Setting resource synced condition to false will trigger a requeue of | ||
// the resource. No need to return a requeue error here. | ||
ackcondition.SetSynced(&resource{ko}, corev1.ConditionFalse, nil, nil) |
8 changes: 8 additions & 0 deletions
8
templates/hooks/vpc_endpoint/sdk_read_many_post_set_output.go.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
if !vpcEndpointAvailable(&resource{ko}) { | ||
// Setting resource synced condition to false will trigger a requeue of | ||
// the resource. No need to return a requeue error here. | ||
ackcondition.SetSynced(&resource{ko}, corev1.ConditionFalse, nil, nil) | ||
} else { | ||
ackcondition.SetSynced(&resource{ko}, corev1.ConditionTrue, nil, nil) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters