Skip to content

[v13] Fix Teleport update reconciliation on status updates#34196

Merged
tigrato merged 1 commit intobranch/v13from
tigrato/skip-reconcialiation-on-status-updates-v13
Nov 3, 2023
Merged

[v13] Fix Teleport update reconciliation on status updates#34196
tigrato merged 1 commit intobranch/v13from
tigrato/skip-reconcialiation-on-status-updates-v13

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Nov 3, 2023

Backport #34063 to branch/v13

* Fix Teleport update reconciliation on `status` updates

This pull request addresses the issue where the Teleport operator reconciliation runs every time the operator updates the `status` subresource.
This continuous reconciliation has led to an infinite loop, causing millions of reconciliations per minute.
When an error occurs, such as having invalid role properties, the Operator updates the status and returns an error, which should trigger a rescheduled reconciliation with exponential backoff. The problem arises because the operator failed to enforce a resource generation change, resulting in an immediate trigger of a new reconciliation when the `status` field is updated.

This pull request modifies the operator to avoid updating subresources and only trigger updates when there is a change in resource generation.

Special thanks to @strideynet for confirming my hypothesis and giving
the solution!

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* return proper status conditions on failures

* enforce condition update on silentUpdateStatus

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato force-pushed the tigrato/skip-reconcialiation-on-status-updates-v13 branch from a6235ed to 9f26e77 Compare November 3, 2023 11:57
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from strideynet November 3, 2023 14:42
@tigrato tigrato added this pull request to the merge queue Nov 3, 2023
Merged via the queue into branch/v13 with commit 09628f5 Nov 3, 2023
@tigrato tigrato deleted the tigrato/skip-reconcialiation-on-status-updates-v13 branch November 3, 2023 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants