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

fix CT name validation #27

Merged
merged 1 commit into from
Jul 2, 2019
Merged

Conversation

ritazh
Copy link
Member

@ritazh ritazh commented Jul 2, 2019

Signed-off-by: Rita Zhang <rita.z.zhang@gmail.com>
@@ -223,6 +223,9 @@ func (c *client) CreateCRD(ctx context.Context, templ *v1alpha1.ConstraintTempla
if templ.ObjectMeta.Name != templ.Spec.CRD.Spec.Names.Plural {
Copy link
Contributor

Choose a reason for hiding this comment

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

I am split on requiring the plural name == the lower-cased kind (which should equal the singular name).

On the one hand it's an odd requirement. On the other hand it plays well with our convention of appending a version to the name.

One way versioning might change is by giving users control over the group, allowing them to store the version there.

My impulse is to keep what's here b/c tighter requirements can always be loosened. Thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

keep what's here b/c tighter requirements can always be loosened

Agreed.

@maxsmythe maxsmythe merged commit 3204f62 into open-policy-agent:master Jul 2, 2019
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.

Conflict: Gatekeeper allows constraint templates of same kind with different names
2 participants