Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix EndpointSlice API availablility check #4852

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

tnqn
Copy link
Member

@tnqn tnqn commented Apr 12, 2023

The API resource name is plural. The incorrect check caused AntreaProxy to always fall back to the Endpoints API.

The API resource name is plural. The incorrect check caused AntreaProxy
to always fall back to the Endpoints API.

Signed-off-by: Quan Tian <qtian@vmware.com>
@tnqn tnqn added action/backport Indicates a PR that requires backports. action/release-note Indicates a PR that should be included in release notes. labels Apr 12, 2023
@@ -1165,7 +1165,7 @@ func endpointSliceAPIAvailable(k8sClient clientset.Interface) (bool, error) {
return false, fmt.Errorf("error getting server resources for GroupVersion %s: %v", discovery.SchemeGroupVersion.String(), err)
}
for _, resource := range resources.APIResources {
if resource.Name == "endpointslice" {
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't remember why I used singular name for this and if I tested it with a cluster with available EndpointSlice API. Anyway change to match Kind which is more visible in API response.

@tnqn
Copy link
Member Author

tnqn commented Apr 13, 2023

/test-e2e
/test-conformance
/skip-networkpolicy

@tnqn tnqn merged commit 80d23f7 into antrea-io:main Apr 13, 2023
@tnqn tnqn deleted the fix-endpointslice-api-check branch April 13, 2023 04:45
jainpulkit22 pushed a commit to urharshitha/antrea that referenced this pull request Apr 28, 2023
The API resource name is plural. The incorrect check caused AntreaProxy
to always fall back to the Endpoints API.

Signed-off-by: Quan Tian <qtian@vmware.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
action/backport Indicates a PR that requires backports. action/release-note Indicates a PR that should be included in release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants