---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.4
  name: ticdcs.cdc.tidbcloud.com
spec:
  group: cdc.tidbcloud.com
  names:
    kind: TiCDC
    listKind: TiCDCList
    plural: ticdcs
    singular: ticdc
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.clusterID
      name: UPSTREAM
      type: string
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: TiCDC is the Schema for the ticdcs 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: TiCDCSpec defines the desired state of TiCDC.
            properties:
              configuration:
                description: |-
                  Configuration is the configuration passed from dataflow
                  it is used to replace gitops
                properties:
                  baseImage:
                    description: BaseImage of the component
                    type: string
                  config:
                    description: Config is the default configuration of component
                    type: string
                  tag:
                    description: Tag is component image tag
                    type: string
                  version:
                    description: Version is component image version
                    type: string
                type: object
              nodeSpec:
                description: NodeSpec defines the node spec of the TiCDC.
                properties:
                  cpuCore:
                    format: int32
                    type: integer
                  kubernetesVersion:
                    type: string
                  memoryGi:
                    format: int32
                    type: integer
                type: object
              replicas:
                minimum: 0
                type: integer
              sharedPoolID:
                description: SharedPoolID is the target physical tidb cluster id
                type: string
              storage:
                description: StorageSpec defines the storage spec of the TiCDC
                properties:
                  iops:
                    format: int32
                    type: integer
                  sizeGi:
                    format: int32
                    type: integer
                  throughputMbs:
                    format: int32
                    type: integer
                  type:
                    type: string
                type: object
            required:
            - nodeSpec
            - replicas
            - sharedPoolID
            - storage
            type: object
          status:
            description: TiCDCStatus defines the observed state of TiCDC.
            properties:
              nodeInfo:
                description: |-
                  NodeInfo is the observed node info,
                  including the replicas and instance type
                  it may not the same as the spec in the spec field when it is scaling
                properties:
                  cpuCore:
                    format: int32
                    type: integer
                  kubernetesVersion:
                    type: string
                  memoryGi:
                    format: int32
                    type: integer
                  replicas:
                    type: integer
                required:
                - replicas
                type: object
              phase:
                description: Phase denotes current ticdc progress
                type: string
              reason:
                description: |-
                  Reason explains why the ticdc is in current phase to human,
                  reason is not supposed to be parsed by program, Phase should be
                  used instead.
                type: string
            required:
            - phase
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
