---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.17.2
  name: ticdcs.cloud.pingcap.com
spec:
  group: cloud.pingcap.com
  names:
    categories:
    - infra-api
    kind: TiCDC
    listKind: TiCDCList
    plural: ticdcs
    singular: ticdc
  preserveUnknownFields: false
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.clusterName
      name: Cluster
      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
              TiCDC only use cloud ssd for storage
            properties:
              CDCClusterID:
                description: CDCClusterID is the cdc  cluster id. When you want to
                  deploy multi cdc cluster to replica one TIDB cluster, fill this
                  field.
                type: string
              UpstreamCoreDNSIp:
                description: UpstreamCoreDNSIp only use on eks provider, downstream
                  use this ip string to connect upstream tidb components
                type: string
              UpstreamclusterName:
                description: UpstreamCluster is the upstream cluster name. When you
                  want to connect the upstream PD client, fill this field.
                type: string
              clusterName:
                description: ClusterName is the target cluster name, target cluster
                  must exist in the same namespace as cdc cluster. It decides where
                  the TiCDC is deployed.
                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
                  tikvImage:
                    description: TiKVImage is the custom TiKV image
                    type: string
                  tikvVersion:
                    description: TiKVVersion is the custom TiKV version
                    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
              networkName:
                description: |-
                  NetworkName references the Network where the TiCDC is hosted,
                  note: the Network need not as the same as the cluster's Network for decouple these two resources
                type: string
              nodeRole:
                description: NodeRole is the aws role or gcp service account that
                  the br node uses
                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
            required:
            - instanceType
            - networkName
            - replicas
            - storageSize
            type: object
          status:
            description: TiCDCStatus defines the observed state of TiCDC
            properties:
              baseProxyURL:
                description: BaseProxyURL denotes base proxy url for ticdc
                type: string
              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: {}
