Reduce API calls to Kubernetes to fetch process group ID information #1295
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes: #761 (by removing this feature)
Fixes: #1291
Type of change
Please select one of the options below.
Discussion
This change reduces the required API calls to Kubernetes to fetch the process group information, this has a benefit in larger Kubernetes clusters. I decided to remove the shrink logic in the remove process groups subcommand, I'm not aware of a use case where we used this and I don't think the additional complexity is worth it for an unused feature.
The new approach has one minor drawback, which I think is okay: Since the process group ID is now calculated based on the cluster spec we could run in a race condition where a user changes the prefix and the cluster is not yet fully reconciled and the user would use the plugin to remove a process group (which still has the old ID). In this case the workaround would be to not use the Pod and rather specify the process group ID directly.
Testing
Unit tests + locally.
Documentation
Follow-up