Skip to content

use direct read on first get of system#484

Merged
stiidk merged 2 commits intomasterfrom
use-api-reader
Jun 6, 2025
Merged

use direct read on first get of system#484
stiidk merged 2 commits intomasterfrom
use-api-reader

Conversation

@bdjgs
Copy link
Copy Markdown
Contributor

@bdjgs bdjgs commented Jun 4, 2025

The controller writes an update to the system resource, such as status. The controller then immediately after starts a new reconcile and reads the system from k8s. However, due to the small delay between the two actions, the newly read system is not always the newest.

The consequence of this is that the next time the controller wants to update the system resource, it gets the error:
the object has been modified; please apply your changes to the latest version and try again

Using the APIReader, it is guaranteed that the system read from k8s is always the newest version.

@bdjgs bdjgs requested a review from a team as a code owner June 4, 2025 12:31
@bdjgs bdjgs force-pushed the use-api-reader branch from 4238fdf to e2c7349 Compare June 4, 2025 12:34
@bdjgs bdjgs force-pushed the use-api-reader branch from e2c7349 to b9254f2 Compare June 4, 2025 13:31
@stiidk stiidk merged commit e4d8b94 into master Jun 6, 2025
2 checks passed
@stiidk stiidk deleted the use-api-reader branch June 6, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants