Skip to content

Commit

Permalink
update: change previous workaround for subscription and add smcp in t…
Browse files Browse the repository at this point in the history
…he list

- remove subs from client cache
- add smcp into exclude cache

Signed-off-by: Wen Zhou <[email protected]>
  • Loading branch information
zdtsw committed Jan 23, 2025
1 parent 871c799 commit 37916c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ func main() { //nolint:funlen,maintidx,gocyclo
&rbacv1.RoleBinding{}: {
Namespaces: oDHCache,
},
&ofapiv1alpha1.Subscription{}: {}, // TODO: workaround to get all subs work, without specify it seems it does not cache from all namespaces
&rbacv1.ClusterRole{}: {},
&rbacv1.ClusterRoleBinding{}: {},
&securityv1.SecurityContextConstraints{}: {},
Expand Down Expand Up @@ -302,6 +301,8 @@ func main() { //nolint:funlen,maintidx,gocyclo
Cache: &client.CacheOptions{
DisableFor: []client.Object{
resources.GvkToUnstructured(gvk.OpenshiftIngress),
&ofapiv1alpha1.Subscription{},
resources.GvkToUnstructured(gvk.ServiceMeshControlPlane),
&authorizationv1.SelfSubjectRulesReview{},
},
// Set it to true so the cache-backed client reads unstructured objects
Expand Down

0 comments on commit 37916c7

Please sign in to comment.