Bug 1947478

Summary: discovery v1 beta1 EndpointSlice is deprecated in Kubernetes 1.21 (OCP 4.8)
Product: OpenShift Container Platform Reporter: Stephen Greene <sgreene>
Component: NetworkingAssignee: Stephen Greene <sgreene>
Networking sub component: router QA Contact: jechen <jechen>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: amcdermo, aos-bugs, hongli
Version: 4.8   
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 22:58:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stephen Greene 2021-04-08 14:41:15 UTC
Discovery.k8s.io/v1beta1 EndpointSlices are deprecated in favor of discovery.k8s.io/v1 in Kubernetes 1.21

See https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.21.md

The router repo should switch from v1beta1 EndpointSlices to v1 EndpointSlices in OCP 4.8 to avoid the following log warning:

W0408 08:08:46.887085       1 warnings.go:70] discovery.k8s.io/v1beta1 EndpointSlice is deprecated in v1.21+, unavailable in v1.25+; use discovery.k8s.io/v1 EndpointSlice

Pulled from:

https://prow.ci.openshift.org/view/gs/origin-ci-test/pr-logs/pull/openshift_router/274/pull-ci-openshift-router-master-e2e-agnostic/1380051277521620992

Comment 1 Stephen Greene 2021-04-09 14:30:05 UTC
Openshift/CoreDNS is also affected by the v1beta1 EndpointSlices deprecation. Scoping this BZ to include import fixes for both openshift/router and openshift/coredns.

Ryan, feel free to patch the Router repo when you get the chance. I will cherry-pick https://github.com/coredns/coredns/pull/4568 to our fork once it merges upstream and re-use this BZ number to do so.

Comment 4 jechen 2021-05-16 20:49:52 UTC
Verified in  4.8.0-0.nightly-2021-05-14-075932

$ oc get clusterversions.config.openshift.io 
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-05-14-075932   True        False         10m     Cluster version is 4.8.0-0.nightly-2021-05-14-075932


No longer see v1beta1 EndpointSlices warning in logs

$ oc -n openshift-dns logs dns-default-2f8sj -c dns|tail
.:5353
[INFO] plugin/reload: Running configuration MD5 = b84c49a40e040f4e11e171af90bde448
CoreDNS-1.8.1
linux/amd64, go1.16.1, 

$ oc -n openshift-ingress logs router-default-759fcd959f-8fjl8 |tail
I0516 20:17:15.683980       1 router.go:579] template "msg"="router reloaded"  "output"=" - Checking http://localhost:80 ...\n - Health check ok : 0 retry attempt(s).\n"
I0516 20:17:51.415670       1 router.go:579] template "msg"="router reloaded"  "output"=" - Checking http://localhost:80 ...\n - Health check ok : 0 retry attempt(s).\n"
I0516 20:17:56.409790       1 router.go:579] template "msg"="router reloaded"  "output"=" - Checking http://localhost:80 ...\n - Health check ok : 0 retry attempt(s).\n"

Comment 7 errata-xmlrpc 2021-07-27 22:58:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:2438