---
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:
              baseProxyURL:
                description: BaseProxyURL denotes base proxy url for ticdc
                type: string
              clusterID:
                description: |-
                  ClusterID is the target tidb cluster id, cluster-service uses the id to create dataplane namespace
                  TiCDC cluster must be deployed in the same dataplane namespace
                type: string
              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
                type: object
              instanceType:
                description: InstanceType is specified the profile of every TiCDC
                  node, the InstanceType must be declared in the Provider spec
                type: string
              mountCertificate:
                description: MountCertificate if mount certificates to dataplane TiCDC
                  pods
                type: boolean
              nodeVersion:
                description: NodeVersion is the k8s version of the VM node
                type: string
              replicas:
                minimum: 0
                type: integer
              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:
            - clusterID
            - instanceType
            - nodeVersion
            - replicas
            - 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:
                  instanceType:
                    type: string
                  replicas:
                    type: integer
                required:
                - instanceType
                - 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: {}
