apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: verticalpodautoscalers.poc.autoscaling.k8s.io
spec:
  group: poc.autoscaling.k8s.io
  version: v1alpha1
  scope: Namespaced
  names:
    plural: verticalpodautoscalers
    singular: verticalpodautoscaler
    kind: VerticalPodAutoscaler
    shortNames:
    - vpa

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: verticalpodautoscalers.poc.autoscaling.k8s.io
spec:
  group: poc.autoscaling.k8s.io
  version: v1alpha1
  scope: Namespaced
  names:
    plural: verticalpodautoscalers
    singular: verticalpodautoscaler
    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


Add basic validation to VPA CRD.
Add basic validation to VPA CRD.
