# grafana_charts_zone-aware-pod-disruption-budget-custom-resource-definition.yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: zoneawarepoddisruptionbudgets.rollout-operator.grafana.com
spec:
  group: rollout-operator.grafana.com
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required:
                - selector
              properties:
                maxUnavailable:
                  type: integer
                  description: The number of pods that can be unavailable within a zone or partition.
                  minimum: 0
                maxUnavailablePercentage:
                  type: integer
                  description: Calculate the maxUnavailable value as a percentage of the StatefulSet's spec.Replica count. This option is not supported when using podNamePartitionRegex.
                  minimum: 0
                  maximum: 100
                selector:
                  type: object
                  description: A selector for finding pods and statefulsets that this ZoneAwarePodDisruptionBudget applies to.
                  required:
                    - matchLabels
                  properties:
                    matchLabels:
                      type: object
                      additionalProperties:
                        type: string
                podNamePartitionRegex:
                  type: string
                  description: A regular expression for returning a partition name given a pod name. This field is optional and should only be used when the ZoneAwarePodDisruptionBudget is to be scoped to a partition, such as a multi-zone ingester deployment with ingest_storage_enabled. Enabling this changes the ZPDB functionality such that minAvailability is applied across ALL zones for a given partition. When not enabled, the minAvailability is applied to pods within the eviction zone assuming there are no disruptions in the other zones.
                podNameRegexGroup:
                  type: integer
                  minimum: 1
                  description: The regular expression group number that contains the partition name. This field is only required when the podNamePartitionRegex field is set and has more then one subexpression grouping. The default value is 1.
      subresources:
        status: {}
  scope: Namespaced
  names:
    kind: ZoneAwarePodDisruptionBudget
    plural: zoneawarepoddisruptionbudgets
    singular: zoneawarepoddisruptionbudget
    shortNames:
      - zdpb