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

Add a check for topologySpreadConstraint #879

Merged

Conversation

sudermanjr
Copy link
Member

This PR fixes #547

Checklist

  • I have signed the CLA
  • I have updated/added any relevant documentation

Description

What's the goal of this PR?

See issue #547 - Add a check for pod topologySpreadConstraints - recommending that users set these to ensure high availability across zones and/or hosts

What changes did you make?

Add topologySpreadConstraint check

What alternative solution should we consider, if any?

There may be more parts of the spec that we want to recommend, and possibly only limit to one topologyKey.

Also, possibly splitting this into two checks - one that ensures a topologySpreadConstraint exists, and another to verify its configuration

@sudermanjr sudermanjr requested a review from rbren as a code owner November 16, 2022 17:45
@fairwinds-insights
Copy link

Fairwinds Insights - Auto-scan job has failed ❌

View the Full Report

Show Logs
found 1 pods for job repo-scan-job-14177
logs for pod repo-scan-job-14177-spc46:
time="2022-11-16T17:45:10Z" level=info msg="cloneRepo: true"
time="2022-11-16T17:45:10Z" level=info msg="cloning github repository"
time="2022-11-16T17:45:37Z" level=info msg="updating branch ref"
time="2022-11-16T17:45:37Z" level=info msg="Audit with Polaris"
time="2022-11-16T17:45:37Z" level=info msg="Looking through images in /app/repository/tmp/_insightsTempImages/"
time="2022-11-16T17:45:37Z" level=info msg=/app/repository/tmp/_insightsTempImages/
time="2022-11-16T17:45:37Z" level=info msg="Extracting details for all images"
time="2022-11-16T17:45:37Z" level=info msg=/app/repository/tmp/_insightsTempImages/
time="2022-11-16T17:45:37Z" level=info msg="downloading trivy database"
time="2022-11-16T17:45:47Z" level=info msg="Converting results to image report"
time="2022-11-16T17:45:47Z" level=info msg="Done converting results to image report"
time="2022-11-16T17:45:49Z" level=info msg="marking directory as safe"
time="2022-11-16T17:45:49Z" level=info msg="getting master hash"
time="2022-11-16T17:45:49Z" level=info msg="Master hash: 467d06f4dbca2985201efc2c2956b125933b9dd2\n"
time="2022-11-16T17:45:49Z" level=info msg="getting current hash"
time="2022-11-16T17:45:49Z" level=info msg="Current hash: 467d06f4dbca2985201efc2c2956b125933b9dd2\n"
time="2022-11-16T17:45:49Z" level=info msg="getting commit message"
time="2022-11-16T17:45:49Z" level=info msg="Commit message: Fix #547 - add a check for topologySpreadConstraint"
time="2022-11-16T17:45:49Z" level=info msg="Branch: sudermanjr/fix-547-add-topology-spread-constraint-check"
time="2022-11-16T17:45:49Z" level=info msg="getting origin url"
time="2022-11-16T17:45:49Z" level=info msg="Origin: https://x-access-token:<TOKEN>@github.com/FairwindsOps/polaris\n"
time="2022-11-16T17:45:49Z" level=info msg="Repo Name: FairwindsOps/polaris"
time="2022-11-16T17:45:49Z" level=fatal msg="Error sending results to insights: Error while sending results back to https://insights.fairwinds.com: Invalid status code: 502 - <html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body>\r\n<center><h1>502 Bad Gateway</h1></center>\r\n</body>\r\n</html>\r\n"

@fairwinds-insights
Copy link

Fairwinds Insights CI Report

View the Full Report

✅ No new Action Items detected!

@CLAassistant
Copy link

CLAassistant commented Jan 4, 2023

CLA assistant check
All committers have signed the CLA.

@sudermanjr sudermanjr force-pushed the sudermanjr/fix-547-add-topology-spread-constraint-check branch from 37242fe to 4e966e2 Compare January 4, 2023 20:46
Copy link
Contributor

@rbren rbren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding tests!

@sudermanjr sudermanjr merged commit a1b63ac into master Jan 4, 2023
@sudermanjr sudermanjr deleted the sudermanjr/fix-547-add-topology-spread-constraint-check branch January 4, 2023 21:05
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.

New checks for anti-affinity policy or topology spread
3 participants