-
Notifications
You must be signed in to change notification settings - Fork 759
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
feat: Gator sync test support #3098
feat: Gator sync test support #3098
Conversation
Signed-off-by: Anlan Du <adu47249@gmail.com>
Signed-off-by: Anlan Du <adu47249@gmail.com>
Signed-off-by: Anlan Du <adu47249@gmail.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3098 +/- ##
==========================================
- Coverage 54.49% 47.48% -7.02%
==========================================
Files 134 228 +94
Lines 12329 19086 +6757
==========================================
+ Hits 6719 9063 +2344
- Misses 5116 9177 +4061
- Partials 494 846 +352
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…eeper into gator-sync-support
Signed-off-by: Anlan Du <adu47249@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good 💯 !! Thanks for working on it.
A few questions and suggestions.
…eeper into gator-sync-support
Signed-off-by: Anlan Du <adu47249@gmail.com>
Signed-off-by: Anlan Du <adu47249@gmail.com>
…eeper into gator-sync-support
Signed-off-by: Anlan Du <adu47249@gmail.com>
163381b
to
1431bb9
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
@anlandu are you still interested in getting this to be merged? |
@sozercan yep! Happy to update the branch and address any comments anyone has, or Alex and Julian took a pretty thorough look so I can just merge it without waiting for another review |
Signed-off-by: Anlan Du <adu47249@gmail.com>
@anlandu looks like there are some lint and unit test failures. can you PTAL? |
Signed-off-by: Anlan Du <adu47249@gmail.com>
Co-authored-by: Rita Zhang <rita.z.zhang@gmail.com> Signed-off-by: Anlan Du <adu47249@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@maxsmythe LGTY? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one nit
Signed-off-by: Anlan Du <adu47249@gmail.com> Co-authored-by: alex <8968914+acpana@users.noreply.github.com> Co-authored-by: Sertaç Özercan <852750+sozercan@users.noreply.github.com> Co-authored-by: Rita Zhang <rita.z.zhang@gmail.com> Signed-off-by: Wyatt Fry <wyattfry@gmail.com>
What this PR does / why we need it:
Certain templates require replicating into OPA to enable correct evaluation. These templates can use the annotation
metadata.gatekeeper.sh/requires-sync-data
to indicate which resources need to be synced. This template annotation is descriptive, not prescriptive. The prescription of which resources to sync is done inSyncSet
resources and/or the GatekeeperConfig
resource. The management of these various requirements can get challenging as the number of templates requiring replicated data increases.gator sync test
aims to mitigate this challenge by enabling the user to verify their sync configuration is correct. The user passes in any number of Constraint Templates, SyncSets, and a Gatekeeper Config object, along with a GVK manifest listing the GVKs supported by the cluster under test, and the command will determine which requirements enumerated by the Constraint Templates are unfulfilled by the given SyncSet(s), Config, and/or manifest.PRD
Which issue(s) this PR fixes (optional, using
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when the PR gets merged):xref #2393
Special notes for your reviewer: