
---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.2.5
  creationTimestamp: null
  name: clusters.core.tidbcloud.com
spec:
  additionalPrinterColumns:
  - JSONPath: .status.tidb.summary
    name: TiDB
    type: string
  - JSONPath: .status.tikv.summary
    name: TiKV
    type: string
  - JSONPath: .status.endpoint
    name: Endpoint
    type: string
  - JSONPath: .status.status
    name: Phase
    type: string
  group: core.tidbcloud.com
  names:
    kind: Cluster
    listKind: ClusterList
    plural: clusters
    singular: cluster
  scope: Namespaced
  subresources:
    status: {}
  validation:
    openAPIV3Schema:
      description: Cluster is the Schema for the clusters 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
        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: ClusterSpec defines the desired state of Cluster
          properties:
            deletionPolicy:
              description: DeletionPolicy specifies what will happen to the underlying
                external when this managed resource is deleted - either "Delete" or
                "Orphan" the external resource. The "Delete" policy is the default
                when no policy is specified.
              enum:
              - Orphan
              - Delete
              type: string
            parameters:
              description: ClusterParameters define the desired state of an TiDB Cloud
                cluster instance
              properties:
                generateName:
                  type: string
                initPassword:
                  nullable: true
                  type: string
                name:
                  type: string
                pd:
                  nullable: true
                  properties:
                    baseImage:
                      nullable: true
                      type: string
                    rawConfig:
                      description: RawConfig is the raw string of a toml config for
                        the component, which will be applied as an overlay to the
                        default config of TiDB Cloud
                      nullable: true
                      type: string
                    replicas:
                      format: int64
                      type: integer
                    versionOverride:
                      nullable: true
                      type: string
                  required:
                  - replicas
                  type: object
                provider:
                  type: string
                region:
                  type: string
                sourceRanges:
                  items:
                    type: string
                  nullable: true
                  type: array
                tidb:
                  properties:
                    baseImage:
                      nullable: true
                      type: string
                    rawConfig:
                      description: RawConfig is the raw string of a toml config for
                        the component, which will be applied as an overlay to the
                        default config of TiDB Cloud
                      nullable: true
                      type: string
                    replicas:
                      format: int64
                      type: integer
                    versionOverride:
                      nullable: true
                      type: string
                  required:
                  - replicas
                  type: object
                tier:
                  type: string
                tiflash:
                  nullable: true
                  properties:
                    baseImage:
                      nullable: true
                      type: string
                    rawConfig:
                      description: RawConfig is the raw string of a toml config for
                        the component, which will be applied as an overlay to the
                        default config of TiDB Cloud
                      nullable: true
                      type: string
                    replicas:
                      format: int64
                      type: integer
                    versionOverride:
                      nullable: true
                      type: string
                  required:
                  - replicas
                  type: object
                tikv:
                  properties:
                    baseImage:
                      nullable: true
                      type: string
                    rawConfig:
                      description: RawConfig is the raw string of a toml config for
                        the component, which will be applied as an overlay to the
                        default config of TiDB Cloud
                      nullable: true
                      type: string
                    replicas:
                      format: int64
                      type: integer
                    versionOverride:
                      nullable: true
                      type: string
                  required:
                  - replicas
                  type: object
                version:
                  type: string
              required:
              - provider
              - region
              - tidb
              - tikv
              - version
              type: object
            providerConfigRef:
              description: ProviderConfigReference specifies how the provider that
                will be used to create, observe, update, and delete this managed resource
                should be configured.
              properties:
                name:
                  description: Name of the referenced object.
                  type: string
              required:
              - name
              type: object
            providerRef:
              description: 'ProviderReference specifies the provider that will be
                used to create, observe, update, and delete this managed resource.
                Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`'
              properties:
                name:
                  description: Name of the referenced object.
                  type: string
              required:
              - name
              type: object
            writeConnectionSecretToRef:
              description: WriteConnectionSecretToReference specifies the namespace
                and name of a Secret to which any connection details for this managed
                resource should be written. Connection details frequently include
                the endpoint, username, and password required to connect to the managed
                resource.
              properties:
                name:
                  description: Name of the secret.
                  type: string
                namespace:
                  description: Namespace of the secret.
                  type: string
              required:
              - name
              - namespace
              type: object
          required:
          - parameters
          type: object
        status:
          description: ClusterStatus defines the observed state of Cluster
          properties:
            conditions:
              description: Conditions of the resource.
              items:
                description: A Condition that may apply to a resource.
                properties:
                  lastTransitionTime:
                    description: LastTransitionTime is the last time this condition
                      transitioned from one status to another.
                    format: date-time
                    type: string
                  message:
                    description: A Message containing details about this condition's
                      last transition from one status to another, if any.
                    type: string
                  reason:
                    description: A Reason for this condition's last transition from
                      one status to another.
                    type: string
                  status:
                    description: Status of this condition; is it currently True, False,
                      or Unknown?
                    type: string
                  type:
                    description: Type of this condition. At most one of each condition
                      type may apply to a resource at any point in time.
                    type: string
                required:
                - lastTransitionTime
                - reason
                - status
                - type
                type: object
              type: array
            endpoint:
              description: Endpoint of the cluster
              type: string
            host:
              description: Host of the cluster
              type: string
            id:
              description: ID of the cluster
              type: string
            initialized:
              description: Initialized indicates if the cluster is fully initialized
              type: boolean
            kubeconfigSecret:
              description: KubeconfigSecret of the cluster
              properties:
                name:
                  description: Name of the secret.
                  type: string
                namespace:
                  description: Namespace of the secret.
                  type: string
              required:
              - name
              - namespace
              type: object
            port:
              description: Port of the cluster
              format: int32
              type: integer
            status:
              description: Status of the cluster
              type: string
            tidb:
              properties:
                cpu:
                  type: string
                currentReplicas:
                  format: int64
                  type: integer
                machineType:
                  type: string
                summary:
                  type: string
              type: object
            tikv:
              properties:
                cpu:
                  type: string
                currentReplicas:
                  format: int64
                  type: integer
                machineType:
                  type: string
                summary:
                  type: string
              type: object
          required:
          - initialized
          type: object
      type: object
  version: v1alpha1
  versions:
  - name: v1alpha1
    served: true
    storage: true
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
