Add OpenAPI schema validation to TrafficSplit CRD
@@ -22,3 +22,28 @@ spec:
type: string
description: The apex service of this split.
JSONPath: .spec.service
+ validation:
+ openAPIV3Schema:
+ properties:
+ spec:
+ type: object
+ required:
+ - service
+ - backends
+ properties:
+ service:
+ description: The apex service of this split.
+ type: string
+ backends:
+ description: The backend services of this split.
+ type: array
+ items:
+ type: object
+ required: ['service', 'weight']
+ properties:
+ service:
+ description: Name of the Kubernetes service.
+ type: string
+ weight:
+ description: Traffic weight value of this backend.
+ type: number
