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

feat: add requiresSyncData and verify-sync test #251

Merged
merged 9 commits into from
Nov 10, 2022
Merged

feat: add requiresSyncData and verify-sync test #251

merged 9 commits into from
Nov 10, 2022

Conversation

apeabody
Copy link
Contributor

  • Adds a new metadata.gatekeeper.sh/requiresSyncData annotation to templates using data.inventory
  • Add a sync.yaml for uniqueingresshost template
  • Adds a new require-sync test which requires templates using data.inventory have both a sync.yaml and metadata.gatekeeper.sh/requiresSyncData annotation

Fixes #248

@apeabody
Copy link
Contributor Author

I left the template versions as-is given the actual rego/etc hasn't changed, but let me know if we should bump the minor or patch. Thanks!

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

Basically LGTM. Ideally we'd use more reliable detection for data.inventory usage, but I think requiring it would depend on how much work that entails.

The question around "what about clusters for whom these resources don't exist" is salient if we want to think about the expected uses of these annotations.

library/general/uniqueingresshost/template.yaml Outdated Show resolved Hide resolved
scripts/require-sync.sh Outdated Show resolved Hide resolved
@maxsmythe
Copy link
Contributor

Also, WRT template versions, leaving them as-is seems right to me (no Rego changes)

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM!

@maxsmythe maxsmythe requested review from ritazh and sozercan October 28, 2022 20:55
scripts/require-sync.sh Outdated Show resolved Hide resolved
Signed-off-by: Andrew Peabody <andrewpeabody@google.com>
@apeabody apeabody requested review from nilekhc and removed request for sozercan and ritazh November 4, 2022 20:28
@apeabody apeabody marked this pull request as draft November 5, 2022 13:23
@apeabody
Copy link
Contributor Author

apeabody commented Nov 7, 2022

Pending #255

julianKatz and others added 3 commits November 7, 2022 21:05
Signed-off-by: Julian Katz <juliankatz@google.com>
Signed-off-by: Andrew Peabody <andrewpeabody@google.com>
@apeabody apeabody requested review from sozercan and removed request for nilekhc November 7, 2022 22:44
@apeabody apeabody marked this pull request as ready for review November 7, 2022 22:44
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

1 nit, but LGTM

scripts/require-sync/main.go Outdated Show resolved Hide resolved
Signed-off-by: Andrew Peabody <andrewpeabody@google.com>
Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

LGTM after 1 nit

scripts/require-sync/main.go Outdated Show resolved Hide resolved
Signed-off-by: Andrew Peabody <andrewpeabody@google.com>
Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

minor comment, otherwise LGTM

Signed-off-by: Andrew Peabody <andrewpeabody@google.com>
Signed-off-by: Andrew Peabody <andrewpeabody@google.com>
@apeabody
Copy link
Contributor Author

Hi Everyone - Is anything else needed before this can be merged? Thanks!

@maxsmythe
Copy link
Contributor

@ritazh any outstanding comments?

Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

@ritazh ritazh merged commit 3272394 into open-policy-agent:master Nov 10, 2022
@apeabody apeabody deleted the apeabody-patch-1 branch November 10, 2022 15:51
@maxsmythe maxsmythe mentioned this pull request Nov 16, 2022
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 Annotation for Constraint Templates' which require SyncData
7 participants