apiVersion: v1
policies:
  - name: Default
    isDefault: true
    rules:
      - identifier: POD_DISRUPTION_BUDGET_MIN_AVAILABLE
        messageOnFailure: Missing Pod Disruption Budget with minAvailable Selector
      - identifier: POD_DISRUPTION_BUDGET_MAX_UNAVAILABLE
        messageOnFailure: Missing Pod Disruption Budget with maxUnavailable Selector
   customRules:
    - identifier: POD_DISRUPTION_BUDGET_MIN_AVAILABLE
      name: Pod Disruption Budget Min Available
      defaultMessageOnFailure: Missing Pod Disruption Budget with minAvailable Selector
      schema:
        properties:
          kind:
           enum:
            - PodDisruptionBudget
          spec:
            type: object
            properties:
              minAvailable:
                type: integer
            required:
            - minAvailable
        required:
        - spec
    - identifier: POD_DISRUPTION_BUDGET_MAX_UNAVAILABLE
      name: Pod Disruption Budget Max Unavailable
      defaultMessageOnFailure: Missing Pod Disruption Budget with maxUnavailable Selector
      schema:
        properties:
          kind:
           enum:
            - PodDisruptionBudget
          spec:
            type: object
            properties:
              maxUnavailable:
                type: integer
            required:
            - maxUnavailable
        required:
        - spec