
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.4.1
  creationTimestamp: null
  name: configchanges.cloud.pingcap.com
spec:
  group: cloud.pingcap.com
  names:
    kind: ConfigChange
    listKind: ConfigChangeList
    plural: configchanges
    singular: configchange
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.clusterName
      name: CLUSTER
      type: string
    - jsonPath: .spec.configRevisionName
      name: CONFIG-REVISION
      type: string
    - jsonPath: .spec.changeStrategy
      name: STRATEGY
      type: string
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .status.lastConfigRevisionName
      name: LAST-CONFIG-REVISION
      type: string
    name: v1
    schema:
      openAPIV3Schema:
        description: ConfigChange is a Job type CRD. you can create a ConfigChange
          to change and then apply a new ConfigRevision to the cluster.
        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: ConfigChangeSpec defines the desired state of ConfigChange
            properties:
              changeStrategy:
                description: ChangeStrategy represents how to apply config to cluster
                enum:
                - RollingRestart
                - HotReload
                - ChangeCMOnly
                - EnsureUpdateToTC
                type: string
              clusterName:
                description: ClusterName is the name of Cluster you want to change
                  ConfigRevision
                type: string
              configRevisionName:
                description: the name of target ConfigRevision
                type: string
              paused:
                description: Paused specifies whether to pause the reconciliation
                  loop for ConfigChange CR
                type: boolean
            required:
            - changeStrategy
            - clusterName
            - configRevisionName
            type: object
          status:
            description: ConfigChangeStatus defines the observed state of ConfigChange
            properties:
              beginTime:
                format: date-time
                type: string
              changedCategories:
                description: ChangedCategories represents what will be changed by
                  this ConfigChange
                items:
                  description: ConfigChangeCategory represents what will be changed
                    by this ConfigChange
                  type: string
                type: array
              changedComponents:
                description: ChangedComponents represents which components will be
                  affected by this ConfigChange
                items:
                  type: string
                type: array
              db:
                description: DB represents the status of the ConfigChange
                properties:
                  pd:
                    properties:
                      changedCategories:
                        description: ChangedCategories represents what of this component
                          will be changed
                        items:
                          description: ConfigChangeCategory represents what will be
                            changed by this ConfigChange
                          type: string
                        type: array
                      done:
                        type: boolean
                      reason:
                        type: string
                      updatedReplicas:
                        description: UpdatedReplicas is used for RollingRestart strategy
                        format: int32
                        type: integer
                    required:
                    - changedCategories
                    - done
                    type: object
                  ticdc:
                    properties:
                      changedCategories:
                        description: ChangedCategories represents what of this component
                          will be changed
                        items:
                          description: ConfigChangeCategory represents what will be
                            changed by this ConfigChange
                          type: string
                        type: array
                      done:
                        type: boolean
                      reason:
                        type: string
                      updatedReplicas:
                        description: UpdatedReplicas is used for RollingRestart strategy
                        format: int32
                        type: integer
                    required:
                    - changedCategories
                    - done
                    type: object
                  tidb:
                    properties:
                      changedCategories:
                        description: ChangedCategories represents what of this component
                          will be changed
                        items:
                          description: ConfigChangeCategory represents what will be
                            changed by this ConfigChange
                          type: string
                        type: array
                      done:
                        type: boolean
                      reason:
                        type: string
                      updatedReplicas:
                        description: UpdatedReplicas is used for RollingRestart strategy
                        format: int32
                        type: integer
                    required:
                    - changedCategories
                    - done
                    type: object
                  tiflash:
                    properties:
                      changedCategories:
                        description: ChangedCategories represents what of this component
                          will be changed
                        items:
                          description: ConfigChangeCategory represents what will be
                            changed by this ConfigChange
                          type: string
                        type: array
                      done:
                        type: boolean
                      reason:
                        type: string
                      updatedReplicas:
                        description: UpdatedReplicas is used for RollingRestart strategy
                        format: int32
                        type: integer
                    required:
                    - changedCategories
                    - done
                    type: object
                  tiflashLearner:
                    properties:
                      changedCategories:
                        description: ChangedCategories represents what of this component
                          will be changed
                        items:
                          description: ConfigChangeCategory represents what will be
                            changed by this ConfigChange
                          type: string
                        type: array
                      done:
                        type: boolean
                      reason:
                        type: string
                      updatedReplicas:
                        description: UpdatedReplicas is used for RollingRestart strategy
                        format: int32
                        type: integer
                    required:
                    - changedCategories
                    - done
                    type: object
                  tikv:
                    properties:
                      changedCategories:
                        description: ChangedCategories represents what of this component
                          will be changed
                        items:
                          description: ConfigChangeCategory represents what will be
                            changed by this ConfigChange
                          type: string
                        type: array
                      done:
                        type: boolean
                      reason:
                        type: string
                      updatedReplicas:
                        description: UpdatedReplicas is used for RollingRestart strategy
                        format: int32
                        type: integer
                    required:
                    - changedCategories
                    - done
                    type: object
                  tiproxy:
                    properties:
                      changedCategories:
                        description: ChangedCategories represents what of this component
                          will be changed
                        items:
                          description: ConfigChangeCategory represents what will be
                            changed by this ConfigChange
                          type: string
                        type: array
                      done:
                        type: boolean
                      reason:
                        type: string
                      updatedReplicas:
                        description: UpdatedReplicas is used for RollingRestart strategy
                        format: int32
                        type: integer
                    required:
                    - changedCategories
                    - done
                    type: object
                type: object
              duration:
                type: string
              endTime:
                format: date-time
                type: string
              lastConfigRevisionName:
                description: LastConfigRevisionName is name of last used ConfigRevision
                type: string
              lastEventSendTime:
                description: LastEventSendTime records the last time we send events
                  to avoid send too more events to clinic
                format: date-time
                type: string
              phase:
                description: Phase is lifecycle phase of the ConfigChange
                enum:
                - Pending
                - Running
                - Completed
                - Failed
                type: string
              reason:
                description: Reason explains why the ConfigChange is in current phase
                  to human, reason is not supposed to be parsed by program, Phase
                  should be used instead.
                type: string
              steps:
                items:
                  properties:
                    name:
                      type: string
                    reason:
                      type: string
                    status:
                      type: string
                  required:
                  - name
                  - reason
                  - status
                  type: object
                type: array
            required:
            - phase
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
