---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    helm.sh/resource-policy: keep
    controller-gen.kubebuilder.io/version: v0.17.3
  name: integrationtasks.observability.pingcap.com
spec:
  group: observability.pingcap.com
  names:
    kind: IntegrationTask
    listKind: IntegrationTaskList
    plural: integrationtasks
    singular: integrationtask
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.taskType
      name: Type
      type: string
    - jsonPath: .spec.clusterID
      name: Cluster
      type: string
    - jsonPath: .status.phase
      name: Phase
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: IntegrationTask is the Schema for the integrationtasks 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: IntegrationTaskSpec defines the desired state of IntegrationTask
            properties:
              accessRoleArn:
                description: accessRoleArn is the role user provided to be trusted.
                type: string
              bucketSharePolicy:
                description: |-
                  BucketSharePolicy controls whether the destination bucket is shared by
                  tenants or exclusive to this tenant. Empty resolves from controller config
                  and then defaults to exclusive.
                enum:
                - shared
                - exclusive
                type: string
              clusterID:
                description: ClusterID is the ID of the cluster this task belongs
                  to
                type: string
              dataFormat:
                description: dataFormat defines the format of the exported data
                type: string
              dataPrefix:
                description: DataPrefix is the S3 key prefix for the destination
                type: string
              destinationBucketName:
                type: string
              endTime:
                description: EndTime is the RFC3339 formatted end time
                type: string
              frequency:
                description: frequency defines when the task should run
                type: string
              jobType:
                description: JobType defines the type of job (Once or LongRunning)
                type: string
              rawLogComponents:
                description: RawLogComponents is the list of log components to filter
                items:
                  type: string
                type: array
              scope:
                description: |-
                  Scope defines whether the task is scoped to a single cluster (default) or a
                  whole tenant. Tenant-scoped tasks cover all clusters under the tenant, and
                  ClusterID is not authoritative for them.
                type: string
              sourceBucketName:
                type: string
              startTime:
                description: StartTime is the RFC3339 formatted start time
                type: string
              taskType:
                description: TaskType defines the type of integration task (e.g.,
                  "slowquery", "raw_log", "sql_stmt")
                type: string
            required:
            - accessRoleArn
            - clusterID
            - destinationBucketName
            - sourceBucketName
            - taskType
            type: object
          status:
            description: IntegrationTaskStatus defines the observed state of IntegrationTask
            properties:
              destinationInfo:
                properties:
                  accessPoint:
                    type: string
                  assumeRoleARN:
                    type: string
                type: object
              lastError:
                description: LastError contains the error message from the last failed
                  execution
                type: string
              phase:
                description: Phase is the current phase of the integration task
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
