
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.4.1
  creationTimestamp: null
  name: clusters.cloud.pingcap.com
spec:
  group: cloud.pingcap.com
  names:
    kind: Cluster
    listKind: ClusterList
    plural: clusters
    singular: cluster
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.networkName
      name: NETWORK
      type: string
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .status.db.version
      name: VERSION
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1
    schema:
      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:
              cluster:
                description: Cluster specifies the cluster topology
                properties:
                  pd:
                    properties:
                      instanceType:
                        description: InstanceType is specified the profile of every
                          PD node, the InstanceType must be declared in the Provider
                          spec
                        type: string
                      replicas:
                        minimum: 1
                        type: integer
                      storageSize:
                        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:
                    - instanceType
                    - replicas
                    type: object
                  tidb:
                    properties:
                      instanceType:
                        description: InstanceType is specified the profile of every
                          TiDB node, the InstanceType must be declared in the Provider
                          spec
                        type: string
                      replicas:
                        minimum: 1
                        type: integer
                    required:
                    - instanceType
                    - replicas
                    type: object
                  tiflash:
                    properties:
                      instanceType:
                        description: InstanceType is specified the profile of every
                          TiFlash node, the InstanceType must be declared in the Provider
                          spec
                        type: string
                      replicas:
                        minimum: 0
                        type: integer
                      storageSize:
                        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
                      useLocalStorage:
                        description: UseLocalStorage specifies whethre the local disk
                          should be used for storage
                        type: boolean
                    required:
                    - instanceType
                    - replicas
                    type: object
                  tikv:
                    properties:
                      instanceType:
                        description: InstanceType is specified the profile of every
                          TiKV node, the InstanceType must be declared in the Provider
                          spec
                        type: string
                      replicas:
                        minimum: 1
                        type: integer
                      storageSize:
                        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
                      useLocalStorage:
                        description: UseLocalStorage specifies whether the local disk
                          should be used for storage
                        type: boolean
                    required:
                    - instanceType
                    - replicas
                    type: object
                required:
                - pd
                - tidb
                - tiflash
                - tikv
                type: object
              networkName:
                description: NetworkName references the Network where the Cluster
                  is hosted, the Network must exist in the same namespace as Cluster
                type: string
              sqlEndpoints:
                description: SqlEndpoints specifies the mysql endpoints of the cluster
                properties:
                  private:
                    description: Private specifies the intranet facing endpoint of
                      the cluster
                    properties:
                      enabled:
                        type: boolean
                      loadBalancerSourceRanges:
                        description: LoadBalancerSourceRanges the IP whitelists of
                          the service
                        items:
                          type: string
                        type: array
                    required:
                    - enabled
                    type: object
                  public:
                    description: Public specifies the internet facing endpoint of
                      the cluster
                    properties:
                      enabled:
                        type: boolean
                      loadBalancerSourceRanges:
                        description: LoadBalancerSourceRanges the IP whitelists of
                          the service
                        items:
                          type: string
                        type: array
                    required:
                    - enabled
                    type: object
                required:
                - public
                type: object
            required:
            - cluster
            - networkName
            - sqlEndpoints
            type: object
          status:
            description: ClusterStatus defines the observed state of Cluster
            properties:
              conditions:
                description: Current service state of cluster.
                items:
                  description: ClusterCondition contains details for the current condition
                    of this cluster.
                  properties:
                    lastProbeTime:
                      description: Last time we probed the condition.
                      format: date-time
                      type: string
                    lastTransitionTime:
                      description: Last time the condition transitioned from one status
                        to another.
                      format: date-time
                      type: string
                    message:
                      description: Human-readable message indicating details about
                        last transition.
                      type: string
                    reason:
                      description: Unique, one-word, CamelCase reason for the condition's
                        last transition.
                      type: string
                    status:
                      description: Status is the status of the condition. Can be True,
                        False.
                      type: string
                    type:
                      description: Type is the type of the condition.
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
              db:
                description: DB represents the status of the TiDB cluster
                properties:
                  pd:
                    description: PD is the current PD status of db cluster
                    properties:
                      members:
                        items:
                          properties:
                            labels:
                              additionalProperties:
                                type: string
                              type: object
                            name:
                              type: string
                            resources:
                              properties:
                                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
                            status:
                              type: string
                          required:
                          - name
                          - resources
                          - status
                          type: object
                        type: array
                      status:
                        type: string
                    required:
                    - status
                    type: object
                  secondaryStatus:
                    description: SecondaryStatus represents if there is a partial
                      failure of db cluster
                    enum:
                    - Healthy
                    - Unhealthy
                    type: string
                  tidb:
                    description: TiDB is the current TiDB status of db cluster
                    properties:
                      members:
                        items:
                          properties:
                            labels:
                              additionalProperties:
                                type: string
                              type: object
                            name:
                              type: string
                            resources:
                              properties:
                                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
                            status:
                              type: string
                          required:
                          - name
                          - resources
                          - status
                          type: object
                        type: array
                      status:
                        type: string
                    required:
                    - status
                    type: object
                  tiflash:
                    description: TiFlash is the current TiFlash status of db cluster
                    properties:
                      members:
                        items:
                          properties:
                            labels:
                              additionalProperties:
                                type: string
                              type: object
                            name:
                              type: string
                            resources:
                              properties:
                                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
                            status:
                              type: string
                          required:
                          - name
                          - resources
                          - status
                          type: object
                        type: array
                      status:
                        type: string
                    required:
                    - status
                    type: object
                  tikv:
                    description: TiKV is the current TiKV status of db cluster
                    properties:
                      members:
                        items:
                          properties:
                            labels:
                              additionalProperties:
                                type: string
                              type: object
                            name:
                              type: string
                            resources:
                              properties:
                                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
                            status:
                              type: string
                          required:
                          - name
                          - resources
                          - status
                          type: object
                        type: array
                      status:
                        type: string
                    required:
                    - status
                    type: object
                  version:
                    description: Version is the current version of db cluster
                    type: string
                required:
                - secondaryStatus
                - version
                type: object
              fromProvider:
                description: FromProvider encodes the provider specific status of
                  the Cluster, e.g. AWS IAM role of the cluster
                nullable: true
                type: object
                x-kubernetes-embedded-resource: true
                x-kubernetes-preserve-unknown-fields: true
              lastActiveTimestamp:
                description: LastActiveTimestamp is the last active time of the cluster
                  in RFC3339 format.
                format: date-time
                type: string
              lastDetectTimestamp:
                description: LastDetectTimestamp is the last time we try to detect
                  the cluster and update LastActiveTimestamp.
                format: date-time
                type: string
              metrics:
                description: Metrics represents the status of the monitoring service
                  for the TiDB cluster
                properties:
                  baseUrl:
                    type: string
                  credentialConfig:
                    type: string
                required:
                - baseUrl
                - credentialConfig
                type: object
              objectStore:
                description: ObjectStore represents the status of the object store
                  for the TiDB cluster
                properties:
                  gcs:
                    properties:
                      path:
                        type: string
                    required:
                    - path
                    type: object
                  s3:
                    properties:
                      path:
                        type: string
                    required:
                    - path
                    type: object
                type: object
              phase:
                description: Phase is lifecycle phase of the Cluster
                enum:
                - Pending
                - Creating
                - Running
                - PendingDelete
                - Deleting
                - Scaling
                - Upgrading
                - Unavailable
                type: string
              proxy:
                description: Proxy represents the status of the proxy service for
                  the TiDB cluster.
                properties:
                  credentialConfig:
                    type: string
                  endpoint:
                    type: string
                required:
                - credentialConfig
                - endpoint
                type: object
              reason:
                description: Reason explains why the cluster is in current phase to
                  human, reason is not supposed to be parsed by program, Phase should
                  be used instead.
                type: string
              sqlEndpoints:
                description: SQLEndpoints represents the status of the SQL endpoints
                properties:
                  privateEndpoint:
                    nullable: true
                    properties:
                      host:
                        type: string
                      port:
                        type: integer
                    required:
                    - host
                    - port
                    type: object
                  publicEndpoint:
                    nullable: true
                    properties:
                      host:
                        type: string
                      port:
                        type: integer
                    required:
                    - host
                    - port
                    type: object
                type: object
            required:
            - phase
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
