# Source: https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/refs/tags/v{version}/config/crd/bases/postgresql.cnpg.io_failoverquorums.yaml
# Version: 1.27.0
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.18.0
  name: failoverquorums.postgresql.cnpg.io
spec:
  group: postgresql.cnpg.io
  names:
    kind: FailoverQuorum
    listKind: FailoverQuorumList
    plural: failoverquorums
    singular: failoverquorum
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: |-
          FailoverQuorum contains the information about the current failover
          quorum status of a PG cluster. It is updated by the instance manager
          of the primary node and reset to zero by the operator to trigger
          an update.
        properties:
          apiVersion:
            description: |-
              APIVersion defines the versioned schema of this representation of an object.
              Servers should convert recognized schemas to the latest internal value, and
              may reject unrecognized values.
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
            type: string
          kind:
            description: |-
              Kind is a string value representing the REST resource this object represents.
              Servers may infer this from the endpoint the client submits requests to.
              Cannot be updated.
              In CamelCase.
              More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
            type: string
          metadata:
            type: object
          status:
            description: Most recently observed status of the failover quorum.
            properties:
              method:
                description: Contains the latest reported Method value.
                type: string
              primary:
                description: |-
                  Primary is the name of the primary instance that updated
                  this object the latest time.
                type: string
              standbyNames:
                description: |-
                  StandbyNames is the list of potentially synchronous
                  instance names.
                items:
                  type: string
                type: array
              standbyNumber:
                description: |-
                  StandbyNumber is the number of synchronous standbys that transactions
                  need to wait for replies from.
                type: integer
            type: object
        required:
        - metadata
        type: object
    served: true
    storage: true
    subresources:
      status: {}
