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

Auto-recover policy report #1730

Merged
merged 4 commits into from Mar 25, 2021

Conversation

realshuting
Copy link
Member

@realshuting realshuting commented Mar 24, 2021

Signed-off-by: Shuting Zhao shutting06@gmail.com

Related issue

/kind bug
/kind feature

fixes #1577
fixes #1277
fixes #1682

This PR:

  • allows users to configure background scan interval by flag --background-scan, the default is set to one hour. The allowed format can be 30s, 15m, 12h.
  • reconciles policy reports at the given interval (background scan interval), refreshes the policy results entries, and removes invalid records
  • re-creates policy report if it gets deleted
  • reconciles policy reports if resourceFilters (configured in the Configmap) changes

What type of PR is this

Proposed changes

Checklist

Further comments

Ideally we want to refresh Cluster/policy cache to trigger the reconciliation of the policy controller, but there's a check to not re-queue the policy if the spec does not change. So this PR adds a ticker to trigger the reconciliation.

Signed-off-by: Shuting Zhao <shutting06@gmail.com>
@realshuting realshuting marked this pull request as draft March 24, 2021 01:29
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
@realshuting realshuting force-pushed the 1577_policy_report_auto_recover branch from 0b8d104 to 3efc350 Compare March 24, 2021 22:11
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
Signed-off-by: Shuting Zhao <shutting06@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants