Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relax probing for forbidden resources #210

Open
hoerup opened this issue Mar 28, 2022 · 1 comment
Open

Relax probing for forbidden resources #210

hoerup opened this issue Mar 28, 2022 · 1 comment

Comments

@hoerup
Copy link
Contributor

hoerup commented Mar 28, 2022

Useing latest sloop on a 1.20.x cluster

In the log it seems that sloop continues to query for resources that it doesn't have access to

IMHO, when sloop has detected a forbidden - it should mark that resourcetype as not accessible and back off
(it could then perhaps retry at a later point eg every CrdRefreshInterval * 4 )

E0328 10:40:10.785774 1 reflector.go:156] pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:108: Failed to list *unstructured.Unstructured: servicemonitors.monitoring.coreos.com is forbidden: User "system:serviceaccount:sloop:sloop" cannot list resource "servicemonitors" in API group "monitoring.coreos.com" at the cluster scope
I0328 10:40:10.986713 1 trace.go:116] Trace[320645588]: "Reflector ListAndWatch" name:pkg/mod/k8s.io/[email protected]/tools/cache/reflector.go:108 (started: 2022-03-28 10:39:58.587890641 +0000 UTC m=+1821.020996664) (total time: 12.398775147s):

$kubectl logs --since=30m -n sloop sloop-0 | grep servicemonitors | wc -l
134
so it queries for the same forbidden resource type aproximately 4.47 times pr minute

@hoerup
Copy link
Contributor Author

hoerup commented Mar 29, 2022

Or maybe event better: add config options for positivelist or negativelist resourcegroups to monitor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant