
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.6.2
  creationTimestamp: null
  name: tidbclusterautoscalers.pingcap.com
spec:
  group: pingcap.com
  names:
    kind: TidbClusterAutoScaler
    listKind: TidbClusterAutoScalerList
    plural: tidbclusterautoscalers
    shortNames:
    - ta
    singular: tidbclusterautoscaler
  preserveUnknownFields: false
  scope: Namespaced
  validation:
    openAPIV3Schema:
      properties:
        apiVersion:
          type: string
        kind:
          type: string
        metadata:
          type: object
        spec:
          properties:
            cluster:
              properties:
                clusterDomain:
                  type: string
                name:
                  type: string
                namespace:
                  type: string
              required:
              - name
              type: object
            tidb:
              properties:
                external:
                  properties:
                    endpoint:
                      properties:
                        host:
                          type: string
                        path:
                          type: string
                        port:
                          format: int32
                          type: integer
                        tlsSecret:
                          properties:
                            name:
                              type: string
                            namespace:
                              type: string
                          required:
                          - name
                          - namespace
                          type: object
                      required:
                      - host
                      - path
                      - port
                      type: object
                    maxReplicas:
                      format: int32
                      type: integer
                  required:
                  - maxReplicas
                  type: object
                resources:
                  additionalProperties:
                    properties:
                      count:
                        format: int32
                        type: integer
                      cpu:
                        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
                      memory:
                        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
                      storage:
                        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
                    required:
                    - cpu
                    - memory
                    type: object
                  type: object
                rules:
                  additionalProperties:
                    properties:
                      max_threshold:
                        type: number
                      min_threshold:
                        type: number
                      resource_types:
                        items:
                          type: string
                        type: array
                    required:
                    - max_threshold
                    type: object
                  type: object
                scaleInIntervalSeconds:
                  format: int32
                  type: integer
                scaleOutIntervalSeconds:
                  format: int32
                  type: integer
              type: object
            tikv:
              properties:
                external:
                  properties:
                    endpoint:
                      properties:
                        host:
                          type: string
                        path:
                          type: string
                        port:
                          format: int32
                          type: integer
                        tlsSecret:
                          properties:
                            name:
                              type: string
                            namespace:
                              type: string
                          required:
                          - name
                          - namespace
                          type: object
                      required:
                      - host
                      - path
                      - port
                      type: object
                    maxReplicas:
                      format: int32
                      type: integer
                  required:
                  - maxReplicas
                  type: object
                resources:
                  additionalProperties:
                    properties:
                      count:
                        format: int32
                        type: integer
                      cpu:
                        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
                      memory:
                        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
                      storage:
                        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
                    required:
                    - cpu
                    - memory
                    type: object
                  type: object
                rules:
                  additionalProperties:
                    properties:
                      max_threshold:
                        type: number
                      min_threshold:
                        type: number
                      resource_types:
                        items:
                          type: string
                        type: array
                    required:
                    - max_threshold
                    type: object
                  type: object
                scaleInIntervalSeconds:
                  format: int32
                  type: integer
                scaleOutIntervalSeconds:
                  format: int32
                  type: integer
              type: object
          required:
          - cluster
          type: object
        status:
          properties:
            tidb:
              additionalProperties:
                properties:
                  lastAutoScalingTimestamp:
                    format: date-time
                    type: string
                type: object
              type: object
            tikv:
              additionalProperties:
                properties:
                  lastAutoScalingTimestamp:
                    format: date-time
                    type: string
                type: object
              type: object
          type: object
      required:
      - metadata
      - spec
      type: object
  version: v1alpha1
  versions:
  - name: v1alpha1
    served: true
    storage: true
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
