apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
    helm.sh/resource-policy: keep
  name: cephnvmeofgateways.ceph.rook.io
spec:
  group: ceph.rook.io
  names:
    kind: CephNVMeOFGateway
    listKind: CephNVMeOFGatewayList
    plural: cephnvmeofgateways
    shortNames:
      - nvmeof
    singular: cephnvmeofgateway
  scope: Namespaced
  versions:
    - additionalPrinterColumns:
        - jsonPath: .status.phase
          name: Phase
          type: string
        - jsonPath: .metadata.creationTimestamp
          name: Age
          type: date
      name: v1
      schema:
        openAPIV3Schema:
          description: CephNVMeOFGateway represents a Ceph NVMe-oF Gateway
          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: NVMeOFGatewaySpec represents the spec of an NVMe-oF gateway
              properties:
                annotations:
                  additionalProperties:
                    type: string
                  description: The annotations-related configuration to add/set on each Pod related object.
                  type: object
                configMapRef:
                  description: |-
                    ConfigMapRef is the name of the ConfigMap containing nvmeof.conf configuration
                    If not specified, a default configuration will be generated
                  minLength: 1
                  type: string
                group:
                  description: Group is the gateway group name for high availability (ANA group)
                  minLength: 1
                  type: string
                hostNetwork:
                  description: Whether host networking is enabled for the gateway. If not set, the network settings from the cluster CR will be applied.
                  type: boolean
                image:
                  description: |-
                    Image is the container image to use for the NVMe-oF gateway daemon.
                    For example, quay.io/ceph/nvmeof:1.5
                  minLength: 1
                  type: string
                instances:
                  description: The number of active gateway instances
                  minimum: 1
                  type: integer
                labels:
                  additionalProperties:
                    type: string
                  description: The labels-related configuration to add/set on each Pod related object.
                  type: object
                livenessProbe:
                  description: |-
                    A liveness-probe to verify that gateway has valid run-time state.
                    If LivenessProbe.Disabled is false and LivenessProbe.Probe is nil uses default probe.
                  properties:
                    disabled:
                      description: Disabled determines whether probe is disable or not
                      type: boolean
                    probe:
                      description: |-
                        Probe describes a health check to be performed against a container to determine whether it is
                        alive or ready to receive traffic.
                      properties:
                        exec:
                          description: Exec specifies a command to execute in the container.
                          properties:
                            command:
                              description: |-
                                Command is the command line to execute inside the container, the working directory for the
                                command  is root ('/') in the container's filesystem. The command is simply exec'd, it is
                                not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use
                                a shell, you need to explicitly call out to that shell.
                                Exit status of 0 is treated as live/healthy and non-zero is unhealthy.
                              items:
                                type: string
                              type: array
                              x-kubernetes-list-type: atomic
                          type: object
                        failureThreshold:
                          description: |-
                            Minimum consecutive failures for the probe to be considered failed after having succeeded.
                            Defaults to 3. Minimum value is 1.
                          format: int32
                          type: integer
                        grpc:
                          description: GRPC specifies a GRPC HealthCheckRequest.
                          properties:
                            port:
                              description: Port number of the gRPC service. Number must be in the range 1 to 65535.
                              format: int32
                              type: integer
                            service:
                              default: ""
                              description: |-
                                Service is the name of the service to place in the gRPC HealthCheckRequest
                                (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md).

                                If this is not specified, the default behavior is defined by gRPC.
                              type: string
                          required:
                            - port
                          type: object
                        httpGet:
                          description: HTTPGet specifies an HTTP GET request to perform.
                          properties:
                            host:
                              description: |-
                                Host name to connect to, defaults to the pod IP. You probably want to set
                                "Host" in httpHeaders instead.
                              type: string
                            httpHeaders:
                              description: Custom headers to set in the request. HTTP allows repeated headers.
                              items:
                                description: HTTPHeader describes a custom header to be used in HTTP probes
                                properties:
                                  name:
                                    description: |-
                                      The header field name.
                                      This will be canonicalized upon output, so case-variant names will be understood as the same header.
                                    type: string
                                  value:
                                    description: The header field value
                                    type: string
                                required:
                                  - name
                                  - value
                                type: object
                              type: array
                              x-kubernetes-list-type: atomic
                            path:
                              description: Path to access on the HTTP server.
                              type: string
                            port:
                              anyOf:
                                - type: integer
                                - type: string
                              description: |-
                                Name or number of the port to access on the container.
                                Number must be in the range 1 to 65535.
                                Name must be an IANA_SVC_NAME.
                              x-kubernetes-int-or-string: true
                            scheme:
                              description: |-
                                Scheme to use for connecting to the host.
                                Defaults to HTTP.
                              type: string
                          required:
                            - port
                          type: object
                        initialDelaySeconds:
                          description: |-
                            Number of seconds after the container has started before liveness probes are initiated.
                            More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
                          format: int32
                          type: integer
                        periodSeconds:
                          description: |-
                            How often (in seconds) to perform the probe.
                            Default to 10 seconds. Minimum value is 1.
                          format: int32
                          type: integer
                        successThreshold:
                          description: |-
                            Minimum consecutive successes for the probe to be considered successful after having failed.
                            Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1.
                          format: int32
                          type: integer
                        tcpSocket:
                          description: TCPSocket specifies a connection to a TCP port.
                          properties:
                            host:
                              description: 'Optional: Host name to connect to, defaults to the pod IP.'
                              type: string
                            port:
                              anyOf:
                                - type: integer
                                - type: string
                              description: |-
                                Number or name of the port to access on the container.
                                Number must be in the range 1 to 65535.
                                Name must be an IANA_SVC_NAME.
                              x-kubernetes-int-or-string: true
                          required:
                            - port
                          type: object
                        terminationGracePeriodSeconds:
                          format: int64
                          type: integer
                        timeoutSeconds:
                          description: |-
                            Number of seconds after which the probe times out.
                            Defaults to 1 second. Minimum value is 1.
                            More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes
                          format: int32
                          type: integer
                      type: object
                  type: object
                nvmeofConfig:
                  additionalProperties:
                    additionalProperties:
                      type: string
                    type: object
                  description: |-
                    NVMeOFConfig is a map of section names to key-value pairs for nvmeof.conf configuration
                    This allows users to override or add configuration options without needing to manage a ConfigMap
                  type: object
                placement:
                  properties:
                    nodeAffinity:
                      properties:
                        preferredDuringSchedulingIgnoredDuringExecution:
                          items:
                            properties:
                              preference:
                                properties:
                                  matchExpressions:
                                    items:
                                      properties:
                                        key:
                                          type: string
                                        operator:
                                          type: string
                                        values:
                                          items:
                                            type: string
                                          type: array
                                          x-kubernetes-list-type: atomic
                                      required:
                                        - key
                                        - operator
                                      type: object
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  matchFields:
                                    items:
                                      properties:
                                        key:
                                          type: string
                                        operator:
                                          type: string
                                        values:
                                          items:
                                            type: string
                                          type: array
                                          x-kubernetes-list-type: atomic
                                      required:
                                        - key
                                        - operator
                                      type: object
                                    type: array
                                    x-kubernetes-list-type: atomic
                                type: object
                                x-kubernetes-map-type: atomic
                              weight:
                                format: int32
                                type: integer
                            required:
                              - preference
                              - weight
                            type: object
                          type: array
                          x-kubernetes-list-type: atomic
                        requiredDuringSchedulingIgnoredDuringExecution:
                          properties:
                            nodeSelectorTerms:
                              items:
                                properties:
                                  matchExpressions:
                                    items:
                                      properties:
                                        key:
                                          type: string
                                        operator:
                                          type: string
                                        values:
                                          items:
                                            type: string
                                          type: array
                                          x-kubernetes-list-type: atomic
                                      required:
                                        - key
                                        - operator
                                      type: object
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  matchFields:
                                    items:
                                      properties:
                                        key:
                                          type: string
                                        operator:
                                          type: string
                                        values:
                                          items:
                                            type: string
                                          type: array
                                          x-kubernetes-list-type: atomic
                                      required:
                                        - key
                                        - operator
                                      type: object
                                    type: array
                                    x-kubernetes-list-type: atomic
                                type: object
                                x-kubernetes-map-type: atomic
                              type: array
                              x-kubernetes-list-type: atomic
                          required:
                            - nodeSelectorTerms
                          type: object
                          x-kubernetes-map-type: atomic
                      type: object
                    podAffinity:
                      properties:
                        preferredDuringSchedulingIgnoredDuringExecution:
                          items:
                            properties:
                              podAffinityTerm:
                                properties:
                                  labelSelector:
                                    properties:
                                      matchExpressions:
                                        items:
                                          properties:
                                            key:
                                              type: string
                                            operator:
                                              type: string
                                            values:
                                              items:
                                                type: string
                                              type: array
                                              x-kubernetes-list-type: atomic
                                          required:
                                            - key
                                            - operator
                                          type: object
                                        type: array
                                        x-kubernetes-list-type: atomic
                                      matchLabels:
                                        additionalProperties:
                                          type: string
                                        type: object
                                    type: object
                                    x-kubernetes-map-type: atomic
                                  matchLabelKeys:
                                    items:
                                      type: string
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  mismatchLabelKeys:
                                    items:
                                      type: string
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  namespaceSelector:
                                    properties:
                                      matchExpressions:
                                        items:
                                          properties:
                                            key:
                                              type: string
                                            operator:
                                              type: string
                                            values:
                                              items:
                                                type: string
                                              type: array
                                              x-kubernetes-list-type: atomic
                                          required:
                                            - key
                                            - operator
                                          type: object
                                        type: array
                                        x-kubernetes-list-type: atomic
                                      matchLabels:
                                        additionalProperties:
                                          type: string
                                        type: object
                                    type: object
                                    x-kubernetes-map-type: atomic
                                  namespaces:
                                    items:
                                      type: string
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  topologyKey:
                                    type: string
                                required:
                                  - topologyKey
                                type: object
                              weight:
                                format: int32
                                type: integer
                            required:
                              - podAffinityTerm
                              - weight
                            type: object
                          type: array
                          x-kubernetes-list-type: atomic
                        requiredDuringSchedulingIgnoredDuringExecution:
                          items:
                            properties:
                              labelSelector:
                                properties:
                                  matchExpressions:
                                    items:
                                      properties:
                                        key:
                                          type: string
                                        operator:
                                          type: string
                                        values:
                                          items:
                                            type: string
                                          type: array
                                          x-kubernetes-list-type: atomic
                                      required:
                                        - key
                                        - operator
                                      type: object
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  matchLabels:
                                    additionalProperties:
                                      type: string
                                    type: object
                                type: object
                                x-kubernetes-map-type: atomic
                              matchLabelKeys:
                                items:
                                  type: string
                                type: array
                                x-kubernetes-list-type: atomic
                              mismatchLabelKeys:
                                items:
                                  type: string
                                type: array
                                x-kubernetes-list-type: atomic
                              namespaceSelector:
                                properties:
                                  matchExpressions:
                                    items:
                                      properties:
                                        key:
                                          type: string
                                        operator:
                                          type: string
                                        values:
                                          items:
                                            type: string
                                          type: array
                                          x-kubernetes-list-type: atomic
                                      required:
                                        - key
                                        - operator
                                      type: object
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  matchLabels:
                                    additionalProperties:
                                      type: string
                                    type: object
                                type: object
                                x-kubernetes-map-type: atomic
                              namespaces:
                                items:
                                  type: string
                                type: array
                                x-kubernetes-list-type: atomic
                              topologyKey:
                                type: string
                            required:
                              - topologyKey
                            type: object
                          type: array
                          x-kubernetes-list-type: atomic
                      type: object
                    podAntiAffinity:
                      properties:
                        preferredDuringSchedulingIgnoredDuringExecution:
                          items:
                            properties:
                              podAffinityTerm:
                                properties:
                                  labelSelector:
                                    properties:
                                      matchExpressions:
                                        items:
                                          properties:
                                            key:
                                              type: string
                                            operator:
                                              type: string
                                            values:
                                              items:
                                                type: string
                                              type: array
                                              x-kubernetes-list-type: atomic
                                          required:
                                            - key
                                            - operator
                                          type: object
                                        type: array
                                        x-kubernetes-list-type: atomic
                                      matchLabels:
                                        additionalProperties:
                                          type: string
                                        type: object
                                    type: object
                                    x-kubernetes-map-type: atomic
                                  matchLabelKeys:
                                    items:
                                      type: string
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  mismatchLabelKeys:
                                    items:
                                      type: string
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  namespaceSelector:
                                    properties:
                                      matchExpressions:
                                        items:
                                          properties:
                                            key:
                                              type: string
                                            operator:
                                              type: string
                                            values:
                                              items:
                                                type: string
                                              type: array
                                              x-kubernetes-list-type: atomic
                                          required:
                                            - key
                                            - operator
                                          type: object
                                        type: array
                                        x-kubernetes-list-type: atomic
                                      matchLabels:
                                        additionalProperties:
                                          type: string
                                        type: object
                                    type: object
                                    x-kubernetes-map-type: atomic
                                  namespaces:
                                    items:
                                      type: string
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  topologyKey:
                                    type: string
                                required:
                                  - topologyKey
                                type: object
                              weight:
                                format: int32
                                type: integer
                            required:
                              - podAffinityTerm
                              - weight
                            type: object
                          type: array
                          x-kubernetes-list-type: atomic
                        requiredDuringSchedulingIgnoredDuringExecution:
                          items:
                            properties:
                              labelSelector:
                                properties:
                                  matchExpressions:
                                    items:
                                      properties:
                                        key:
                                          type: string
                                        operator:
                                          type: string
                                        values:
                                          items:
                                            type: string
                                          type: array
                                          x-kubernetes-list-type: atomic
                                      required:
                                        - key
                                        - operator
                                      type: object
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  matchLabels:
                                    additionalProperties:
                                      type: string
                                    type: object
                                type: object
                                x-kubernetes-map-type: atomic
                              matchLabelKeys:
                                items:
                                  type: string
                                type: array
                                x-kubernetes-list-type: atomic
                              mismatchLabelKeys:
                                items:
                                  type: string
                                type: array
                                x-kubernetes-list-type: atomic
                              namespaceSelector:
                                properties:
                                  matchExpressions:
                                    items:
                                      properties:
                                        key:
                                          type: string
                                        operator:
                                          type: string
                                        values:
                                          items:
                                            type: string
                                          type: array
                                          x-kubernetes-list-type: atomic
                                      required:
                                        - key
                                        - operator
                                      type: object
                                    type: array
                                    x-kubernetes-list-type: atomic
                                  matchLabels:
                                    additionalProperties:
                                      type: string
                                    type: object
                                type: object
                                x-kubernetes-map-type: atomic
                              namespaces:
                                items:
                                  type: string
                                type: array
                                x-kubernetes-list-type: atomic
                              topologyKey:
                                type: string
                            required:
                              - topologyKey
                            type: object
                          type: array
                          x-kubernetes-list-type: atomic
                      type: object
                    tolerations:
                      items:
                        properties:
                          effect:
                            type: string
                          key:
                            type: string
                          operator:
                            type: string
                          tolerationSeconds:
                            format: int64
                            type: integer
                          value:
                            type: string
                        type: object
                      type: array
                    topologySpreadConstraints:
                      items:
                        properties:
                          labelSelector:
                            properties:
                              matchExpressions:
                                items:
                                  properties:
                                    key:
                                      type: string
                                    operator:
                                      type: string
                                    values:
                                      items:
                                        type: string
                                      type: array
                                      x-kubernetes-list-type: atomic
                                  required:
                                    - key
                                    - operator
                                  type: object
                                type: array
                                x-kubernetes-list-type: atomic
                              matchLabels:
                                additionalProperties:
                                  type: string
                                type: object
                            type: object
                            x-kubernetes-map-type: atomic
                          matchLabelKeys:
                            items:
                              type: string
                            type: array
                            x-kubernetes-list-type: atomic
                          maxSkew:
                            format: int32
                            type: integer
                          minDomains:
                            format: int32
                            type: integer
                          nodeAffinityPolicy:
                            type: string
                          nodeTaintsPolicy:
                            type: string
                          topologyKey:
                            type: string
                          whenUnsatisfiable:
                            type: string
                        required:
                          - maxSkew
                          - topologyKey
                          - whenUnsatisfiable
                        type: object
                      type: array
                  type: object
                pool:
                  description: Pool is the RADOS pool where NVMe-oF configuration is stored
                  minLength: 1
                  type: string
                ports:
                  description: Ports configuration for the NVMe-oF gateway
                  properties:
                    discoveryPort:
                      description: 'DiscoveryPort is the port for discovery service (default: 8009)'
                      format: int32
                      maximum: 65535
                      minimum: 1
                      type: integer
                    gatewayPort:
                      description: 'GatewayPort is the port for the gateway service (default: 5500)'
                      format: int32
                      maximum: 65535
                      minimum: 1
                      type: integer
                    ioPort:
                      description: 'IOPort is the port for NVMe-oF IO traffic (default: 4420)'
                      format: int32
                      maximum: 65535
                      minimum: 1
                      type: integer
                    monitorPort:
                      description: 'MonitorPort is the port for the monitor service (default: 5499)'
                      format: int32
                      maximum: 65535
                      minimum: 1
                      type: integer
                  type: object
                priorityClassName:
                  description: PriorityClassName sets the priority class on the pods
                  type: string
                resources:
                  description: Resources set resource requests and limits
                  properties:
                    claims:
                      description: |-
                        Claims lists the names of resources, defined in spec.resourceClaims,
                        that are used by this container.

                        This field depends on the
                        DynamicResourceAllocation feature gate.

                        This field is immutable. It can only be set for containers.
                      items:
                        description: ResourceClaim references one entry in PodSpec.ResourceClaims.
                        properties:
                          name:
                            description: |-
                              Name must match the name of one entry in pod.spec.resourceClaims of
                              the Pod where this field is used. It makes that resource available
                              inside a container.
                            type: string
                          request:
                            description: |-
                              Request is the name chosen for a request in the referenced claim.
                              If empty, everything from the claim is made available, otherwise
                              only the result of this request.
                            type: string
                        required:
                          - name
                        type: object
                      type: array
                      x-kubernetes-list-map-keys:
                        - name
                      x-kubernetes-list-type: map
                    limits:
                      additionalProperties:
                        anyOf:
                          - type: integer
                          - type: string
                        pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
                        x-kubernetes-int-or-string: true
                      description: |-
                        Limits describes the maximum amount of compute resources allowed.
                        More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
                      type: object
                    requests:
                      additionalProperties:
                        anyOf:
                          - type: integer
                          - type: string
                        pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
                        x-kubernetes-int-or-string: true
                      description: |-
                        Requests describes the minimum amount of compute resources required.
                        If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
                        otherwise to an implementation-defined value. Requests cannot exceed Limits.
                        More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
                      type: object
                  type: object
              required:
                - group
                - image
                - instances
                - pool
              type: object
            status:
              description: NVMeOFGatewayStatus represents the status of Ceph NVMe-oF Gateway
              properties:
                cephx:
                  properties:
                    daemon:
                      description: Daemon shows the CephX key status for local Ceph daemons associated with this resources.
                      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
                  type: object
                conditions:
                  items:
                    description: Condition represents a status condition on any Rook-Ceph Custom Resource.
                    properties:
                      lastHeartbeatTime:
                        format: date-time
                        type: string
                      lastTransitionTime:
                        format: date-time
                        type: string
                      message:
                        type: string
                      reason:
                        description: ConditionReason is a reason for a condition
                        type: string
                      status:
                        type: string
                      type:
                        description: ConditionType represent a resource's status
                        type: string
                    type: object
                  type: array
                observedGeneration:
                  description: ObservedGeneration is the latest generation observed by the controller.
                  format: int64
                  type: integer
                phase:
                  type: string
              type: object
          required:
            - metadata
            - spec
          type: object
      served: true
      storage: true
      subresources:
        status: {}
