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

Allow tuning background scan period #1277

Closed
realshuting opened this issue Nov 19, 2020 · 9 comments · Fixed by #1730
Closed

Allow tuning background scan period #1277

realshuting opened this issue Nov 19, 2020 · 9 comments · Fixed by #1730
Assignees
Labels
enhancement New feature or request

Comments

@realshuting
Copy link
Member

Is your feature request related to a problem? Please describe.
Kyverno has the background scan interval set to 15 minutes by default, this allows the controller to periodically validate the existing resources and audit the result (to policy report).

While in a larger size cluster, with hundreds of workloads running, this default value seems to be relatively small. It would be nice if it can be configured through a flag or an environment variable.

@realshuting realshuting added the enhancement New feature or request label Nov 19, 2020
@chipzoller
Copy link
Member

Consider making this configurable via a standard ConfigMap resource rather than having to pass a flag or env var. Any future Kyverno tweaks could be delivered similarly.

@realshuting
Copy link
Member Author

Yes we should use ConfigMap for any custom configurations. Forgot that in the first place!

@JimBugwadia JimBugwadia added the good first issue Good for newcomers label Nov 20, 2020
@yindia yindia self-assigned this Dec 11, 2020
@yindia yindia removed their assignment Jan 11, 2021
@imrajdas
Copy link
Contributor

imrajdas commented Feb 2, 2021

@realshuting I am taking this issue. Thanks

@imrajdas
Copy link
Contributor

imrajdas commented Feb 2, 2021

const resyncPeriod = 15 * time.Minute

I have to pick this resyncPeriod value from the kyverno configmap. Please correct me, if I am wrong?`

@realshuting
Copy link
Member Author

@rajdas98 Thanks for looking into this issue.

resyncPeriod is used for re-syncing the informer's cache, it has nothing to do with the background scan process. Here is a reference of what needs to be done - #1395 (review).

I'm happy to discuss this in detail if you have any doubts.

@imrajdas
Copy link
Contributor

imrajdas commented Feb 4, 2021

Thanks @realshuting for this information. I am exploring about this issue right now. I will get back to you if I have any doubts.

@imrajdas
Copy link
Contributor

imrajdas commented Feb 9, 2021

@realshuting Can you explain about this issue little bit? Not able to get the context from this #1395 (review). Thanks

@realshuting realshuting added this to the Kyverno Release 1.3.3 milestone Feb 10, 2021
@realshuting realshuting removed the good first issue Good for newcomers label Feb 10, 2021
@realshuting realshuting self-assigned this Feb 10, 2021
@realshuting
Copy link
Member Author

@rajdas98 Thanks for looking at the issue, there are other requirements that need to be addressed along with this. I can come up with the standards first.

@realshuting
Copy link
Member Author

#1730 adds the flag --background-scan to configure the interval. This interval cannot be configured dynamically because it is used to initialize the background controller. Therefore, restart is required when changing the interval.

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

Successfully merging a pull request may close this issue.

5 participants