mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-11 14:11:14 +00:00
Services and Endpoints weren't properly sync'ing
They need incremental changes and a resync on start.
This commit is contained in:
@@ -27,10 +27,11 @@ func NewServiceRegistry() *ServiceRegistry {
|
||||
}
|
||||
|
||||
type ServiceRegistry struct {
|
||||
List api.ServiceList
|
||||
Service *api.Service
|
||||
Err error
|
||||
Endpoints api.Endpoints
|
||||
List api.ServiceList
|
||||
Service *api.Service
|
||||
Err error
|
||||
Endpoints api.Endpoints
|
||||
EndpointsList api.EndpointsList
|
||||
|
||||
DeletedID string
|
||||
GottenID string
|
||||
@@ -66,6 +67,10 @@ func (r *ServiceRegistry) WatchServices(label, field labels.Selector, resourceVe
|
||||
return nil, r.Err
|
||||
}
|
||||
|
||||
func (r *ServiceRegistry) ListEndpoints() (*api.EndpointsList, error) {
|
||||
return &r.EndpointsList, r.Err
|
||||
}
|
||||
|
||||
func (r *ServiceRegistry) GetEndpoints(id string) (*api.Endpoints, error) {
|
||||
r.GottenID = id
|
||||
return &r.Endpoints, r.Err
|
||||
|
Reference in New Issue
Block a user