# Source: https://raw.githubusercontent.com/rabbitmq/messaging-topology-operator/v{version}/config/crd/bases/rabbitmq.com_federations.yaml
# Version: 1.17.4
# VersionOf: rmq-messaging-topology-operator
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.17.1
  name: federations.rabbitmq.com
spec:
  group: rabbitmq.com
  names:
    categories:
    - rabbitmq
    kind: Federation
    listKind: FederationList
    plural: federations
    singular: federation
  scope: Namespaced
  versions:
  - name: v1beta1
    schema:
      openAPIV3Schema:
        description: Federation is the Schema for the federations API
        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
          spec:
            description: |-
              FederationSpec defines the desired state of Federation
              For how to configure federation upstreams, see: https://www.rabbitmq.com/federation-reference.html.
            properties:
              ackMode:
                enum:
                - on-confirm
                - on-publish
                - no-ack
                type: string
              deletionPolicy:
                default: delete
                description: |-
                  DeletionPolicy defines the behavior of federation in the RabbitMQ cluster when the corresponding custom resource is deleted.
                  Can be set to 'delete' or 'retain'. Default is 'delete'.
                enum:
                - delete
                - retain
                type: string
              exchange:
                type: string
              expires:
                type: integer
              maxHops:
                type: integer
              messageTTL:
                type: integer
              name:
                description: Required property; cannot be updated
                type: string
              prefetch-count:
                type: integer
              queue:
                type: string
              queueType:
                description: |-
                  The queue type of the internal upstream queue used by exchange federation.
                  Defaults to classic (a single replica queue type). Set to quorum to use a replicated queue type.
                  Changing the queue type will delete and recreate the upstream queue by default.
                  This may lead to messages getting lost or not routed anywhere during the re-declaration.
                  To avoid that, set resource-cleanup-mode key to never.
                  This requires manually deleting the old upstream queue so that it can be recreated with the new type.
                enum:
                - classic
                - quorum
                type: string
              rabbitmqClusterReference:
                description: |-
                  Reference to the RabbitmqCluster that this federation upstream will be created in.
                  Required property.
                properties:
                  connectionSecret:
                    description: |-
                      Secret contains the http management uri for the RabbitMQ cluster.
                      The Secret must contain the key `uri`, `username` and `password` or operator will error.
                      Have to set either name or connectionSecret, but not both.
                    properties:
                      name:
                        default: ""
                        description: |-
                          Name of the referent.
                          This field is effectively required, but due to backwards compatibility is
                          allowed to be empty. Instances of this type with an empty value here are
                          almost certainly wrong.
                          More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                        type: string
                    type: object
                    x-kubernetes-map-type: atomic
                  name:
                    description: |-
                      The name of the RabbitMQ cluster to reference.
                      Have to set either name or connectionSecret, but not both.
                    type: string
                  namespace:
                    description: |-
                      The namespace of the RabbitMQ cluster to reference.
                      Defaults to the namespace of the requested resource if omitted.
                    type: string
                type: object
              reconnectDelay:
                type: integer
              resourceCleanupMode:
                description: |-
                  Whether to delete the internal upstream queue when federation links stop.
                  By default, the internal upstream queue is deleted immediately when a federation link stops.
                  Set to never to keep the upstream queue around and collect messages even when changing federation configuration.
                enum:
                - default
                - never
                type: string
              trustUserId:
                type: boolean
              uriSecret:
                description: |-
                  Secret contains the AMQP URI(s) for the upstream.
                  The Secret must contain the key `uri` or operator will error.
                  `uri` should be one or multiple uris separated by ','.
                  Required property.
                properties:
                  name:
                    default: ""
                    description: |-
                      Name of the referent.
                      This field is effectively required, but due to backwards compatibility is
                      allowed to be empty. Instances of this type with an empty value here are
                      almost certainly wrong.
                      More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                    type: string
                type: object
                x-kubernetes-map-type: atomic
              vhost:
                default: /
                description: Default to vhost '/'; cannot be updated
                type: string
            required:
            - name
            - rabbitmqClusterReference
            - uriSecret
            type: object
          status:
            description: FederationStatus defines the observed state of Federation
            properties:
              conditions:
                items:
                  properties:
                    lastTransitionTime:
                      description: The last time this Condition status changed.
                      format: date-time
                      type: string
                    message:
                      description: Full text reason for current status of the condition.
                      type: string
                    reason:
                      description: One word, camel-case reason for current status
                        of the condition.
                      type: string
                    status:
                      description: True, False, or Unknown
                      type: string
                    type:
                      description: Type indicates the scope of the custom resource
                        status addressed by the condition.
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
              observedGeneration:
                description: |-
                  observedGeneration is the most recent successful generation observed for this Federation. It corresponds to the
                  Federation's generation, which is updated on mutation by the API Server.
                format: int64
                type: integer
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
