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

crd: add validation to crd #153

Merged
merged 4 commits into from
Oct 31, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions manifests/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,49 @@ spec:
# shortNames allow shorter string to match your resource on the CLI
shortNames:
- tc
validation:
# openAPIV3Schema is the schema for validating custom objects.
openAPIV3Schema:
properties:
spec:
properties:
pd:
properties:
limits:
properties:
cpu:
Copy link
Member

@tennix tennix Oct 29, 2018

Choose a reason for hiding this comment

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

Is it necessary to add other fields validation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can add additional verification if needed in the future.

type: string
requests:
properties:
cpu:
type: string
tikv:
properties:
limits:
properties:
cpu:
type: string
requests:
properties:
cpu:
type: string
tidb:
properties:
limits:
properties:
cpu:
type: string
requests:
properties:
cpu:
type: string
tikvPromGateway:
properties:
limits:
properties:
cpu:
type: string
requests:
properties:
cpu:
type: string