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 demo templates to the constraint template library #205

Merged
merged 6 commits into from
Aug 21, 2019

Conversation

maxsmythe
Copy link
Contributor

Signed-off-by: Max Smythe smythe@google.com

@maxsmythe maxsmythe requested a review from ritazh August 15, 2019 04:37
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
Signed-off-by: Max Smythe <smythe@google.com>
@ritazh
Copy link
Member

ritazh commented Aug 19, 2019

nit: To be consistent with stuff already in library/pod-security-policy, for example this, can you pls also add example.yaml for each one of these?

@maxsmythe
Copy link
Contributor Author

Done.

Note I think the library directory structure may need to change for the permanent repo. There are a few problems.

It's not clear who this library is intended for, admins or constraint developers. This is a problem in itself, but there are problems with the structure as-is depending on the audience.

If admins:

  • The templates should not all be called template.yaml, that makes it hard to copy templates into a new place
  • Templates should live in a separate directory tree from constraint.yaml and example.yaml so that I can kubectl apply -f at some root and apply all templates in the library. It also makes it easier to batch copy templates to a different repo.

If constraint developers:

  • We do not care about the resultant template, we want to generate them on the fly so we can build, test, repeat. We instead want a template template (golang template of a ConstraintTemplate, or similar)

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
Copy link
Member

ritazh commented Aug 20, 2019

Regarding the library directory structure, let's discuss this as a group to get more feedback.

@maxsmythe
Copy link
Contributor Author

LMK if you want to merge this before or after the directory update.

@ritazh
Copy link
Member

ritazh commented Aug 21, 2019

Per our group discussion, maybe rename the folder library/demo to something else e.g. container, service, or just general, since we also have a demo folder outside of library that should be used for demo purposes. WDYT?

Signed-off-by: Max Smythe <smythe@google.com>
@maxsmythe
Copy link
Contributor Author

SGTM, renaming to general and merging

@maxsmythe maxsmythe merged commit 6038cde into open-policy-agent:master Aug 21, 2019
@maxsmythe maxsmythe deleted the add_demo_to_library branch December 12, 2019 22:24
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.

2 participants