Skip to content

Commit

Permalink
Fix clusterrole permissions and type on Informer
Browse files Browse the repository at this point in the history
  • Loading branch information
jukie authored and jmurret committed Mar 7, 2024
1 parent c11b034 commit 093826a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 7 additions & 1 deletion charts/consul/templates/sync-catalog-clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ rules:
- apiGroups: [ "" ]
resources:
- services
- endpoints
verbs:
- get
- list
- watch
- apiGroups: ["discovery.k8s.io"]
resources:
- endpointslices
verbs:
- get
- list
Expand Down
3 changes: 1 addition & 2 deletions control-plane/catalog/to-consul/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,6 @@ func (t *serviceEndpointsResource) Informer() cache.SharedIndexInformer {
return cache.NewSharedIndexInformer(
&cache.ListWatch{
ListFunc: func(options metav1.ListOptions) (runtime.Object, error) {

return t.Service.Client.DiscoveryV1().
EndpointSlices(metav1.NamespaceAll).
List(t.Ctx, options)
Expand All @@ -857,7 +856,7 @@ func (t *serviceEndpointsResource) Informer() cache.SharedIndexInformer {
Watch(t.Ctx, options)
},
},
&discoveryv1.EndpointSliceList{},
&discoveryv1.EndpointSlice{},
0,
cache.Indexers{},
)
Expand Down

0 comments on commit 093826a

Please sign in to comment.