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

warn about costly scan scheduling in Helm output #256

Merged
merged 6 commits into from Mar 26, 2024
Merged

warn about costly scan scheduling in Helm output #256

merged 6 commits into from Mar 26, 2024

Conversation

matheusfm
Copy link
Contributor

Description

This PR includes a warning in the Helm output if a scan appears to be scheduled to run more frequently than the recommendation.

It also fixes the helm template for ClusterScans, checking the API Version before calling the lookup function.

How has this been tested?

Trying installing Zora with different schedules for each scan.

helm upgrade --install zora charts/zora/ -f /tmp/values.yaml -n zora-system --create-namespace

This is the values.yaml:

clusterName: kind
scan:
  # misconfiguration:
  vulnerability:
    # At every minute
    # schedule: "* * * * *"
    
    # At every minute on Wednesday
    # schedule: "* * * * 4"
    
    # At 00:00 on Wednesday (weekly)
    # schedule: "0 0 * * 4"
    
    # At 00:00 on day-of-month 1 (monthly)
    # schedule: "0 0 1 * *"
    
    # At every minute on day-of-month 1
    # schedule: "* * 1 * *"

    # Every hour at every 30th minute
    # schedule: "*/30 * * * *"

    # Every hour at every minute (range of values)
    # schedule: "0-59 * * * *"

    # Every hour at minute 15 and 45
    # schedule: "15,45 * * * *"

    # Every hour at minute 0
    # schedule: "0 * * * *"

    # At minute 0 past hour 12 and 18
    # schedule: "0 12,18 * * *"

    # At 10:00
    # schedule: "0 10 * * *"

    # Every hour at minute 0 on day-of-month 5
    schedule: "0 * 5 * *"

Unfortunately helm template does not render NOTES.txt (helm/helm#6901)

Checklist

  • I have labeled this PR with the relevant Type labels
  • I have documented my code (if applicable)
  • My changes are covered by tests

@matheusfm matheusfm added the documentation 📄 Improvements or additions to documentation label Mar 22, 2024
@matheusfm matheusfm requested a review from knrc March 22, 2024 21:30
@matheusfm matheusfm self-assigned this Mar 22, 2024
@matheusfm matheusfm merged commit 8828c73 into main Mar 26, 2024
3 checks passed
@matheusfm matheusfm deleted the UD-1299 branch March 26, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📄 Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants