Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce API calls to Kubernetes to fetch process group ID information #1295

Merged
merged 2 commits into from
Jul 22, 2022

Conversation

johscheuer
Copy link
Member

Description

Fixes: #761 (by removing this feature)
Fixes: #1291

Type of change

Please select one of the options below.

  • Bug fix (non-breaking change which fixes an issue)

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

@johscheuer johscheuer added the plugin Kubectl plugin label Jul 16, 2022
@johscheuer johscheuer marked this pull request as ready for review July 16, 2022 10:24
@johscheuer johscheuer requested review from 09harsh and brownleej July 16, 2022 10:24
@johscheuer johscheuer changed the title Reduce API call to Kubernetes to fetch process group ID information Reduce API calls to Kubernetes to fetch process group ID information Jul 16, 2022
@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: 72ed3b0
  • Duration 1:00:13
  • Result: ❌ FAILED
  • Error: Error while executing command: make -C tests -kj prOperator. Reason: exit status 2
  • Build Logs (available for 30 days)

Copy link
Contributor

@09harsh 09harsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍
just few NIT changes

@johscheuer johscheuer merged commit ee8b9b2 into FoundationDB:main Jul 22, 2022
@johscheuer johscheuer deleted the refactor-plugin branch July 22, 2022 08:05
@foundationdb-ci
Copy link

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

  • Commit ID: 06239af
  • Duration 1:06:28
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin Kubectl plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin should not fetch all Pods to query process groups Shrink in the plugin doesn't work was expected
3 participants