---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.10.0
  creationTimestamp: null
  name: o11yclusters.agent.observability.pingcap.com
spec:
  group: agent.observability.pingcap.com
  names:
    kind: O11yCluster
    listKind: O11yClusterList
    plural: o11yclusters
    singular: o11ycluster
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .status.phase
      name: PHASE
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: AGE
      type: date
    name: v1
    schema:
      openAPIV3Schema:
        description: O11yCluster is the Schema for the o11yclusters 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: O11yClusterSpec defines the desired state of O11yCluster
            properties:
              cloudTopology:
                description: CloudTopology defines the cloud topology of the cluster
                properties:
                  eks:
                    properties:
                      assumeExternalId:
                        type: string
                      assumeRoleArn:
                        type: string
                      nodeSubnetIDs:
                        items:
                          type: string
                        type: array
                      providerConfigRef:
                        description: A Reference to a named object.
                        properties:
                          name:
                            description: Name of the referenced object.
                            type: string
                          policy:
                            description: Policies for referencing.
                            properties:
                              resolution:
                                default: Required
                                description: Resolution specifies whether resolution
                                  of this reference is required. The default is 'Required',
                                  which means the reconcile will fail if the reference
                                  cannot be resolved. 'Optional' means this reference
                                  will be a no-op if it cannot be resolved.
                                enum:
                                - Required
                                - Optional
                                type: string
                              resolve:
                                description: Resolve specifies when this reference
                                  should be resolved. The default is 'IfNotPresent',
                                  which will attempt to resolve the reference only
                                  when the corresponding field is not present. Use
                                  'Always' to resolve the reference on every reconcile.
                                enum:
                                - Always
                                - IfNotPresent
                                type: string
                            type: object
                        required:
                        - name
                        type: object
                      securityGroupID:
                        type: string
                      vpcID:
                        type: string
                    required:
                    - assumeExternalId
                    - assumeRoleArn
                    - nodeSubnetIDs
                    - providerConfigRef
                    - securityGroupID
                    - vpcID
                    type: object
                  gke:
                    properties:
                      network:
                        type: string
                      projectID:
                        type: string
                      subnets:
                        items:
                          type: string
                        type: array
                    required:
                    - network
                    - projectID
                    - subnets
                    type: object
                type: object
              clusterTopology:
                description: ClusterTopology describes the topology of the tidb cluster
                properties:
                  pd:
                    properties:
                      cpu:
                        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
                      memory:
                        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
                      replicas:
                        type: integer
                    required:
                    - replicas
                    type: object
                  tidb:
                    properties:
                      cpu:
                        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
                      memory:
                        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
                      replicas:
                        type: integer
                    required:
                    - replicas
                    type: object
                  tiflash:
                    properties:
                      cpu:
                        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
                      memory:
                        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
                      replicas:
                        type: integer
                    required:
                    - replicas
                    type: object
                  tikv:
                    properties:
                      cpu:
                        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
                      memory:
                        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
                      replicas:
                        type: integer
                    required:
                    - replicas
                    type: object
                required:
                - pd
                - tidb
                - tiflash
                - tikv
                type: object
              dataPlaneConfig:
                description: DataPlaneConfig is used for how to connect to dataplane
                properties:
                  agentAccessARN:
                    type: string
                  agentManagerARN:
                    type: string
                  agentSharedRole:
                    description: AgentSharedRole indicates whether the agent role
                      is shared with other clusters, it's typically used for shared
                      VPC.
                    type: boolean
                  cluster:
                    type: string
                  provider:
                    type: string
                required:
                - agentAccessARN
                - agentManagerARN
                - cluster
                - provider
                type: object
              pause:
                type: boolean
            type: object
          status:
            description: O11yClusterStatus defines the observed state of O11yCluster
            properties:
              agentInfo:
                additionalProperties:
                  properties:
                    current:
                      properties:
                        resources:
                          description: Resources indicates the resource requirements
                            for the agent it's calculated from the cluster topplogy
                            or node numbers.
                          properties:
                            limits:
                              additionalProperties:
                                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
                              description: 'Limits describes the maximum amount of
                                compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
                              type: object
                            requests:
                              additionalProperties:
                                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
                              description: 'Requests describes the minimum amount
                                of compute resources required. If Requests is omitted
                                for a container, it defaults to Limits if that is
                                explicitly specified, otherwise to an implementation-defined
                                value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
                              type: object
                          type: object
                        spec:
                          type: string
                      required:
                      - spec
                      type: object
                    desired:
                      properties:
                        resources:
                          description: Resources indicates the resource requirements
                            for the agent it's calculated from the cluster topplogy
                            or node numbers.
                          properties:
                            limits:
                              additionalProperties:
                                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
                              description: 'Limits describes the maximum amount of
                                compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
                              type: object
                            requests:
                              additionalProperties:
                                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
                              description: 'Requests describes the minimum amount
                                of compute resources required. If Requests is omitted
                                for a container, it defaults to Limits if that is
                                explicitly specified, otherwise to an implementation-defined
                                value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
                              type: object
                          type: object
                        spec:
                          type: string
                      required:
                      - spec
                      type: object
                  type: object
                type: object
              phase:
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
