---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.2.8
  name: couchbaseautoscalers.couchbase.com
spec:
  group: couchbase.com
  names:
    kind: CouchbaseAutoscaler
    listKind: CouchbaseAutoscalerList
    plural: couchbaseautoscalers
    shortNames:
    - cba
    singular: couchbaseautoscaler
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.size
      name: size
      type: string
    - jsonPath: .spec.servers
      name: servers
      type: string
    name: v2
    schema:
      openAPIV3Schema:
        description: CouchbaseAutoscaler provides an interface for the Kubernetes Horizontal Pod Autoscaler to interactive with the Couchbase cluster and provide autoscaling.  This resource is not defined by the end user, and is managed by the Operator.
        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: CouchbaseAutoscalerSpec allows control over an autoscaling group.
            properties:
              servers:
                description: Servers specifies the server group that this autoscaler belongs to.
                minLength: 1
                type: string
              size:
                description: Size allows the server group to be dynamically scaled.
                minimum: 0
                type: integer
            required:
            - servers
            - size
            type: object
          status:
            description: CouchbaseAutoscalerStatus provides information to the HPA to assist with scaling server groups.
            properties:
              labelSelector:
                description: LabelSelector allows the HPA to select resources to monitor for resource utilization in order to trigger scaling.
                type: string
              size:
                description: Size is the current size of the server group.
                minimum: 1
                type: integer
            required:
            - labelSelector
            - size
            type: object
        required:
        - spec
        type: object
    served: true
    storage: true
    subresources:
      scale:
        labelSelectorPath: .status.labelSelector
        specReplicasPath: .spec.size
        statusReplicasPath: .status.size
      status: {}
