Skip to content

Conversation

@papillonyi
Copy link

Fix bug causing potential pod error by using patch for annotations

This pr switches from using 'update' to 'patch' when setting pod annotations. The previous 'update' approach was found to potentially cause pod errors. By using 'patch', we now only modify the specific fields that have changed, preventing the previous issue and improving efficiency.

This commit switches from using 'update' to 'patch' when setting pod annotations. The previous 'update' approach was found to potentially cause pod errors. By using 'patch', we now only modify the specific fields that have changed, preventing the previous issue.

Signed-off-by: ronin <[email protected]>
This commit adds 'patch' permission to the clusterRole associated with our plugin. This change allows the plugin to patch pod annotations more safely, reducing the chance of errors and conflicts during updates.

Signed-off-by: ronin <[email protected]>
This commit adds an error handler to catch and manage potential JSON encoding errors. By handling these errors explicitly, we can prevent crashes and improve the stability of the application.

Signed-off-by: ronin <[email protected]>
@papillonyi papillonyi force-pushed the fix-update-pod-fail branch from 66f0300 to a8807c7 Compare July 17, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant