---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.4
  name: tidbautoscalings.serverless.pingcap.com
spec:
  group: serverless.pingcap.com
  names:
    kind: TidbAutoscaling
    listKind: TidbAutoscalingList
    plural: tidbautoscalings
    singular: tidbautoscaling
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .scaleDownStabilizationWindowSeconds
      name: ScaleDown SW
      type: integer
    - jsonPath: .scaleDownEssentialStabilizationWindowSeconds
      name: ScaleDown ES
      type: integer
    - jsonPath: .disable
      name: Disable
      type: boolean
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: TidbAutoscaling is the Schema for the tidbautoscalings 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
          disable:
            default: false
            type: boolean
          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
          metrics:
            items:
              properties:
                avgValue:
                  exclusiveMinimum: true
                  minimum: 0
                  type: number
                name:
                  type: string
                podLabel:
                  default: pod
                  type: string
                promSql:
                  type: string
                scaleFlapping:
                  default: 0.1
                  maximum: 1
                  minimum: 0
                  type: number
              required:
              - avgValue
              - name
              - podLabel
              - promSql
              - scaleFlapping
              type: object
            type: array
          scaleDownCheckMetrics:
            items:
              properties:
                name:
                  type: string
                promSql:
                  type: string
                tokenLabel:
                  default: token
                  type: string
              required:
              - name
              - promSql
              - tokenLabel
              type: object
            type: array
          scaleDownEssentialStabilizationWindowSeconds:
            default: 900
            format: int64
            minimum: 0
            type: integer
          scaleDownStabilizationWindowSeconds:
            default: 300
            format: int64
            minimum: 0
            type: integer
          scaleUpStabilizationWindowSeconds:
            format: int64
            minimum: 0
            type: integer
        required:
        - metrics
        type: object
    served: true
    storage: true
    subresources: {}
