Implementation of serving not ready endpoints
This commit is contained in:
parent
a4c0b1649d
commit
9588e51146
13 changed files with 204 additions and 42 deletions
11
pkg/provider/kubernetes/k8s/endpoint.go
Normal file
11
pkg/provider/kubernetes/k8s/endpoint.go
Normal file
|
@ -0,0 +1,11 @@
|
|||
package k8s
|
||||
|
||||
import (
|
||||
v1 "k8s.io/api/discovery/v1"
|
||||
"k8s.io/utils/ptr"
|
||||
)
|
||||
|
||||
// EndpointServing returns true if the endpoint is still serving the service.
|
||||
func EndpointServing(endpoint v1.Endpoint) bool {
|
||||
return ptr.Deref(endpoint.Conditions.Ready, false) || ptr.Deref(endpoint.Conditions.Serving, false)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue