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 support for metadata.gatekeeper.sh/requires-sync-data #2393

Open
apeabody opened this issue Nov 9, 2022 · 10 comments
Open

Add support for metadata.gatekeeper.sh/requires-sync-data #2393

apeabody opened this issue Nov 9, 2022 · 10 comments
Assignees
Labels
enhancement New feature or request triaged

Comments

@apeabody
Copy link
Contributor

apeabody commented Nov 9, 2022

Describe the solution you'd like
Write an error in status if the required data specified in metadata.gatekeeper.sh/requiresSyncData is not part of the sync resource.

Background: open-policy-agent/gatekeeper-library#251 (comment)

@sozercan
Copy link
Member

sozercan commented Nov 9, 2022

we have a similar issue for GK version: open-policy-agent/frameworks#240 it would be nice to align checking for these metadata fields

@anlandu
Copy link
Member

anlandu commented Nov 28, 2022

Are we validating only on constraint creation or is the mere existence of a constraint with this annotation on the cluster enough to require that resource to be synced?

@maxsmythe
Copy link
Contributor

IMO existence... this can be checked by looking at the value of the sync config:

  • any time a constraint is created/updated
  • any time the sync config is modified

This will probably require adding a watch on the sync config to the constraint reconciler (or vice versa). Because constraints are dynamically typed (e.g. their kinds are not known in advance), this may be difficult to do.

@anlandu
Copy link
Member

anlandu commented Dec 16, 2022

@anlandu
Copy link
Member

anlandu commented Jan 18, 2023

Hi @apeabody are you by chance working on this? I was thinking of picking it up

@apeabody
Copy link
Contributor Author

Hi @anlandu - Thanks for reaching out! I'm not currently working on this, but I think it is valuable.

@julianKatz
Copy link
Contributor

Docs for this should be added as well: open-policy-agent/gatekeeper-library#261

@salaxander salaxander added this to the v3.13.0 milestone Apr 26, 2023
@ritazh ritazh modified the milestones: v3.13.0, v3.14.0 Jul 13, 2023
@apeabody apeabody changed the title Add support for metadata.gatekeeper.sh/requiresSyncData Add support for metadata.gatekeeper.sh/requires-sync-data Jul 26, 2023
@salaxander salaxander moved this to 🆕 New in Gatekeeper Workboard Jul 27, 2023
@ritazh
Copy link
Member

ritazh commented Oct 11, 2023

@anlandu @julianKatz @acpana can you please update this issue with still remains in order to close that issue out? thank you!

@acpana
Copy link
Contributor

acpana commented Oct 12, 2023

can you please update this issue with still remains in order to close that issue out? thank you!

Sure, I can take a stab at answering that:

#3030 adds the sync_controller and readiness support for syncsets

There is still a need to design and implement the error reporting/ UX being described in the proposal for when a ConstraintTemplate doesn't have a GVK covered by any of the sync sources (syncsets or config).

@ritazh
Copy link
Member

ritazh commented Jan 3, 2024

SyncSet integration with metadata.gatekeeper.sh/requires-sync-data blocker:

  • status reporting on the constraintTemplate
  • generate SyncSet resources (as part of gator), we do not want GK to generate SyncSet due to privilege escalation

Before the integration is in place, this annotation is used as informational and documentation. With Gator sync test support, users can discover the lack of SyncSet resource as part of the test suite.

@ritazh ritazh removed this from the v3.15.0 milestone Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triaged
Projects
Status: 🆕 New
Development

No branches or pull requests

9 participants