# Source: https://raw.githubusercontent.com/rabbitmq/messaging-topology-operator/v{version}/config/crd/bases/rabbitmq.com_users.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: users.rabbitmq.com
spec:
  group: rabbitmq.com
  names:
    categories:
    - rabbitmq
    kind: User
    listKind: UserList
    plural: users
    singular: user
  scope: Namespaced
  versions:
  - name: v1beta1
    schema:
      openAPIV3Schema:
        description: User is the Schema for the users 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: Spec configures the desired state of the User object.
            properties:
              importCredentialsSecret:
                description: |-
                  Defines a Secret containing the credentials for the User. If this field is omitted, random a username and
                  password will be generated. The Secret must have the following keys in its Data field:

                   * `username` – Must be present or the import will fail.
                   * `passwordHash` – The SHA-512 hash of the password. If the hash is an empty string, a passwordless user
                     will be created. For more information, see https://www.rabbitmq.com/docs/passwords.
                   * `password` – Plain-text password. Will be used only if the `passwordHash` key is missing.

                  Note that this import only occurs at creation time, and is ignored once a password has been set on a User.
                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
              limits:
                description: |-
                  Limits to apply to a user to restrict the number of connections and channels
                  the user can create. These limits can be used as guard rails in environments
                  where applications cannot be trusted and monitored in detail, for example,
                  when RabbitMQ clusters are offered as a service. See https://www.rabbitmq.com/docs/user-limits.
                properties:
                  channels:
                    description: Limits how many AMQP 0.9.1 channels the user can
                      open.
                    format: int32
                    type: integer
                  connections:
                    description: Limits how many connections the user can open.
                    format: int32
                    type: integer
                type: object
              rabbitmqClusterReference:
                description: |-
                  Reference to the RabbitmqCluster that the user will be created for. This cluster must
                  exist for the User object to be created.
                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
              tags:
                description: |-
                  List of permissions tags to associate with the user. This determines the level of
                  access to the RabbitMQ management UI granted to the user. Omitting this field will
                  lead to a user than can still connect to the cluster through messaging protocols,
                  but cannot perform any management actions.
                  For more information, see https://www.rabbitmq.com/management.html#permissions.
                items:
                  description: |-
                    UserTag defines the level of access to the management UI allocated to the user.
                    For more information, see https://www.rabbitmq.com/management.html#permissions.
                  enum:
                  - management
                  - policymaker
                  - monitoring
                  - administrator
                  type: string
                type: array
            required:
            - rabbitmqClusterReference
            type: object
          status:
            description: Status exposes the observed state of the User object.
            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
              credentials:
                description: Provides a reference to a Secret object containing the
                  user credentials.
                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
              observedGeneration:
                description: |-
                  observedGeneration is the most recent successful generation observed for this User. It corresponds to the
                  User's generation, which is updated on mutation by the API Server.
                format: int64
                type: integer
              username:
                description: Provide rabbitmq Username
                type: string
            required:
            - username
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
