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

test: Use Endpoint instead of EndpointSlice in 1.17 #15010

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

nebril
Copy link
Member

@nebril nebril commented Feb 17, 2021

GKE keeps EndpointSlice controller disabled by default on 1.17 clusters.
This change causes tests to use Endpoint object instead of
EndpointSlice on 1.17 clusters.

fixes #14996

GKE keeps EndpointSlice controller disabled by default on 1.17 clusters.
This change causes tests to use `Endpoint` object instead of
`EndpointSlice` on 1.17 clusters.

Signed-off-by: Maciej Kwiek <maciej@isovalent.com>
@nebril nebril requested a review from a team as a code owner February 17, 2021 14:24
@nebril nebril requested a review from kkourt February 17, 2021 14:24
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 17, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added this to In progress in 1.10.0 Feb 17, 2021
@nebril nebril added the release-note/ci This PR makes changes to the CI. label Feb 17, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Feb 17, 2021
@nebril
Copy link
Member Author

nebril commented Feb 17, 2021

test-me-please

@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.9.5 Feb 17, 2021
@pchaigno
Copy link
Member

Also required for v1.9: https://datastudio.google.com/s/pp3gaU0V6DQ.

Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

We have this code that performs the detection of endpoint slices being or not being enabled in the kube-apiserver.

func endpointSlicesFallbackDiscovery(client kubernetes.Interface) error {
// Discovery of API groups requires the API services of the apiserver to be
// healthy. Such API services can depend on the readiness of regular pods
// which require Cilium to function correctly. By treating failure to
// discover API groups as fatal, a critial loop can be entered in which
// Cilium cannot start because the API groups can't be discovered.
//
// Here we acknowledge the lack of discovery ability as non Fatal and fall back to probing
// the API directly.
_, err := client.DiscoveryV1beta1().EndpointSlices("default").Get(context.TODO(), "kubernetes", metav1.GetOptions{})
if err == nil {
cached.mutex.Lock()
cached.capabilities.EndpointSlice = true
cached.mutex.Unlock()
return nil
}
if errors.IsNotFound(err) {
log.WithError(err).Info("Unable to retrieve EndpointSlices for default/kubernetes. Disabling EndpointSlices")
// StatusNotFound is a safe error, EndpointSlices are
// disabled and the agent can continue.
return nil
}
// Unknown error, we can't derive whether to enable or disable
// EndpointSlices and need to error out.
return fmt.Errorf("unable to validate EndpointSlices support: %s", err)
}

We need to understand if that is not enough.

@pchaigno
Copy link
Member

@aanm This bug is currently breaking all GKE builds. Maybe we can merge this and track the apparent bug in the endpoint-slice detection separately?

Copy link
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

Discussed offline, this is a bug in our tests as we expect the EndpointSlice to be available in 1.17 which is not the case for GKe.

@pchaigno pchaigno removed the request for review from kkourt February 17, 2021 15:36
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Feb 17, 2021
@nebril nebril merged commit 6b8e994 into master Feb 17, 2021
1.10.0 automation moved this from In progress to Done Feb 17, 2021
@nebril nebril deleted the pr/toservices-use-endpoint-1.17 branch February 17, 2021 17:59
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.9 in 1.9.5 Feb 18, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.5 Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
No open projects
1.9.5
Backport done to v1.9
Development

Successfully merging this pull request may close these issues.

CI: GKE: K8sServicesTest External services To Services
6 participants