Skip to content

Commit

Permalink
k8s/watchers: Add missing v1 EndpointSlice group on init
Browse files Browse the repository at this point in the history
The K8sWatcher's InitK8sSubsystem() calls resourceGroups() which returns
a list of resources that should be waited on via WaitForCacheSync(). The
v1 version of EndpointSlice was missing from this list. This commit adds
it.

Signed-off-by: Chris Tarazi <chris@isovalent.com>
  • Loading branch information
christarazi authored and pchaigno committed Nov 5, 2021
1 parent c8d2fc7 commit 832246b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/k8s/watchers/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,8 @@ func (k *K8sWatcher) resourceGroups() []string {
// with the right service -> backend (k8s endpoints) translation.
if k8s.SupportsEndpointSlice() {
k8sGroups = append(k8sGroups, K8sAPIGroupEndpointSliceV1Beta1Discovery)
} else if k8s.SupportsEndpointSliceV1() {
k8sGroups = append(k8sGroups, K8sAPIGroupEndpointSliceV1Discovery)
}
k8sGroups = append(k8sGroups, K8sAPIGroupEndpointV1Core)

Expand Down

0 comments on commit 832246b

Please sign in to comment.