Add basic validation to VPA CRD.

This commit is contained in:
kgrygiel 2018-01-29 23:35:41 +01:00
parent 14e6923ef8
commit 38cb991577
1 changed files with 39 additions and 0 deletions

View File

@ -12,3 +12,42 @@ spec:
kind: VerticalPodAutoscaler
shortNames:
- vpa
validation:
# openAPIV3Schema is the schema for validating custom objects.
openAPIV3Schema:
properties:
spec:
required:
- selector
properties:
selector:
type: object
updatePolicy:
properties:
updateMode:
type: string
enum:
- "Off"
- "Initial"
- "Auto"
resourcePolicy:
properties:
containerPolicies:
type: array
items:
type: object
required:
- name
properties:
name:
type: string
mode:
type: string
enum:
- "On"
- "Off"
minAllowed:
type: object
maxAllowed:
type: object