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

Allow using kube-apiserver cache for pod list requests #1018

Merged
merged 2 commits into from
Jun 24, 2024

Conversation

hieurender
Copy link
Contributor

Issue #, if available: #1017

Description of changes: Exposes the configuration use_apiserver_cache, which sets ResourceVersion: "0" when listing pods on a node.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@hieurender hieurender requested a review from a team as a code owner May 29, 2024 18:12
Copy link

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want this PR to never become stale, please ask a maintainer to apply the "stalebot-ignore" label.

@github-actions github-actions bot added the stale Issues / PRs with no activity label Jun 14, 2024
Copy link

This PR was closed because it has become stale with no activity.

@github-actions github-actions bot closed this Jun 19, 2024
@LikithaVemulapalli LikithaVemulapalli added stalebot-ignore To NOT let the stalebot update or close the Issue / PR and removed stale Issues / PRs with no activity labels Jun 19, 2024
Copy link
Contributor

@LikithaVemulapalli LikithaVemulapalli left a comment

Choose a reason for hiding this comment

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

Hello @hieurender, thanks for opening a PR for the issue that you were facing. We added multiple configs earlier as per the requirements and were reluctant to adding additional configs to reduce complexity. We had seen some interest on this config from other users, we are happy to merge it. Could you please add some tests around the newly added config in config_test.go. Thanks

@hieurender
Copy link
Contributor Author

@LikithaVemulapalli added the test you asked for.

I also added a second commit, as even with the first commit we noticed NTH was still doing quorum-lists of pods. We traced the source to the call drain.RunNodeDrain, which calls drainer.GetPodsForDeletion, which does not set ResourceVersion=0 in its ListOptions:

	podList := &corev1.PodList{}
	initialOpts := &metav1.ListOptions{
		LabelSelector: labelSelector.String(),
		FieldSelector: fields.SelectorFromSet(fields.Set{"spec.nodeName": nodeName}).String(),
		Limit:         d.ChunkSize,
	}

It was fairly straightforward to refactor so that we don't call this function.

@LikithaVemulapalli
Copy link
Contributor

@hieurender could you please check the test failures and fix them. We observed these test failures for your changes related to latest commit, we can only approve them if there are no issues for the existing functionality, once the tests passes will review the changes. Thanks.

@hieurender
Copy link
Contributor Author

I verified that make e2e-test passes locally 👍

Copy link
Contributor

@LikithaVemulapalli LikithaVemulapalli left a comment

Choose a reason for hiding this comment

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

/lgtm, thanks for fixing :)

@LikithaVemulapalli LikithaVemulapalli merged commit d9b30ee into aws:main Jun 24, 2024
14 checks passed
@hieurender
Copy link
Contributor Author

@LikithaVemulapalli are there guidelines on releasing new versions? I'd love to be able to move off my fork.

@LikithaVemulapalli
Copy link
Contributor

Hello @hieurender, we will be doing release in a timely basis every month, we will be doing release in mid July. Will update your original issue or this PR once this is included in the new release. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stalebot-ignore To NOT let the stalebot update or close the Issue / PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants