apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
    helm.sh/resource-policy: keep
  name: cephclients.ceph.rook.io
spec:
  group: ceph.rook.io
  names:
    kind: CephClient
    listKind: CephClientList
    plural: cephclients
    shortNames:
      - cephcl
    singular: cephclient
  scope: Namespaced
  versions:
    - additionalPrinterColumns:
        - jsonPath: .status.phase
          name: Phase
          type: string
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
      name: v1
      schema:
        openAPIV3Schema:
          description: CephClient represents a Ceph Client
          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 represents the specification of a Ceph Client
              properties:
                caps:
                  additionalProperties:
                    type: string
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                name:
                  type: string
                removeSecret:
                  description: |-
                    RemoveSecret indicates whether the current secret for this ceph client should be removed or not.
                    If true, the K8s secret will be deleted, but the cephx keyring will remain until the CR is deleted.
                  type: boolean
                secretName:
                  description: |-
                    SecretName is the name of the secret created for this ceph client.
                    If not specified, the default name is "rook-ceph-client-" as a prefix to the CR name.
                  type: string
                  x-kubernetes-validations:
                    - message: SecretName is immutable and cannot be changed
                      rule: self == oldSelf
                security:
                  description: Security represents security settings
                  properties:
                    cephx:
                      description: 'CephX configures CephX key settings. More: https://docs.ceph.com/en/latest/dev/cephx/'
                      properties:
                        keyGeneration:
                          description: |-
                            KeyGeneration specifies the desired CephX key generation. This is used when KeyRotationPolicy
                            is KeyGeneration and ignored for other policies. If this is set to greater than the current
                            key generation, relevant keys will be rotated, and the generation value will be updated to
                            this new value (generation values are not necessarily incremental, though that is the
                            intended use case). If this is set to less than or equal to the current key generation, keys
                            are not rotated.
                          format: int32
                          maximum: 4294967295
                          minimum: 0
                          type: integer
                          x-kubernetes-validations:
                            - message: keyGeneration cannot be decreased
                              rule: self >= oldSelf
                        keyRotationPolicy:
                          description: |-
                            KeyRotationPolicy controls if and when CephX keys are rotated after initial creation.
                            One of Disabled, or KeyGeneration. Default Disabled.
                          enum:
                            - ""
                            - Disabled
                            - KeyGeneration
                          type: string
                      type: object
                  type: object
              required:
                - caps
              type: object
            status:
              description: Status represents the status of a Ceph Client
              properties:
                cephx:
                  properties:
                    keyCephVersion:
                      description: |-
                        KeyCephVersion reports the Ceph version that created the current generation's keys. This is
                        same string format as reported by `CephCluster.status.version.version` to allow them to be
                        compared. E.g., `20.2.0-0`.
                        For all newly-created resources, this field set to the version of Ceph that created the key.
                        The special value "Uninitialized" indicates that keys are being created for the first time.
                        An empty string indicates that the version is unknown, as expected in brownfield deployments.
                      type: string
                    keyGeneration:
                      description: |-
                        KeyGeneration represents the CephX key generation for the last successful reconcile.
                        For all newly-created resources, this field is set to `1`.
                        When keys are rotated due to any rotation policy, the generation is incremented or updated to
                        the configured policy generation.
                        Generation `0` indicates that keys existed prior to the implementation of key tracking.
                      format: int32
                      type: integer
                  type: object
                info:
                  additionalProperties:
                    type: string
                  nullable: true
                  type: object
                observedGeneration:
                  description: ObservedGeneration is the latest generation observed by the controller.
                  format: int64
                  type: integer
                phase:
                  description: ConditionType represent a resource's status
                  type: string
              type: object
              x-kubernetes-preserve-unknown-fields: true
          required:
            - metadata
            - spec
          type: object
      served: true
      storage: true
      subresources:
        status: {}
