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

Do not return error in ProjectGetter when namespaces don't exist #52

Merged
merged 2 commits into from
Apr 12, 2023

Conversation

aiyengar2
Copy link

Related Issue: rancher/rancher#41214

Since ProjectGetter methods are called by the indexers, if the methods return errors on namespaces not existing, it can result in a panic due to the default behavior of the thread_safe_store.go.

This would only happen in situations where there's an extremely large amount of load on the Prometheus Federator, since normally indexing is a fairly quick operation that should happen before a namespace can be created and deleted (unless the controllers are heavily backed up in processing).

Since ProjectGetter methods are called by the indexers, if the methods return errors on namespaces not existing, it can result in a panic due to the default behavior of the [thread_safe_store.go](https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/client-go/tools/cache/thread_safe_store.go#L148-L153).

This would only happen in situations where there's an extremely large amount of load on the Prometheus Federator, since normally indexing is a fairly quick operation that should happen before a namespace can be created and deleted (unless the controllers are heavily backed up in processing).
@aiyengar2 aiyengar2 requested a review from geethub97 April 11, 2023 23:58
@aiyengar2 aiyengar2 merged commit ecbf39a into rancher:main Apr 12, 2023
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

Successfully merging this pull request may close these issues.

2 participants