---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.1
  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
                  version:
                    type: string
                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: 'Deprecated: 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:
                            claims:
                              description: |-
                                Claims lists the names of resources, defined in spec.resourceClaims,
                                that are used by this container.

                                This is an alpha field and requires enabling the
                                DynamicResourceAllocation feature gate.

                                This field is immutable. It can only be set for containers.
                              items:
                                description: ResourceClaim references one entry in
                                  PodSpec.ResourceClaims.
                                properties:
                                  name:
                                    description: |-
                                      Name must match the name of one entry in pod.spec.resourceClaims of
                                      the Pod where this field is used. It makes that resource available
                                      inside a container.
                                    type: string
                                  request:
                                    description: |-
                                      Request is the name chosen for a request in the referenced claim.
                                      If empty, everything from the claim is made available, otherwise
                                      only the result of this request.
                                    type: string
                                required:
                                - name
                                type: object
                              type: array
                              x-kubernetes-list-map-keys:
                              - name
                              x-kubernetes-list-type: map
                            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. Requests cannot exceed Limits.
                                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:
                            claims:
                              description: |-
                                Claims lists the names of resources, defined in spec.resourceClaims,
                                that are used by this container.

                                This is an alpha field and requires enabling the
                                DynamicResourceAllocation feature gate.

                                This field is immutable. It can only be set for containers.
                              items:
                                description: ResourceClaim references one entry in
                                  PodSpec.ResourceClaims.
                                properties:
                                  name:
                                    description: |-
                                      Name must match the name of one entry in pod.spec.resourceClaims of
                                      the Pod where this field is used. It makes that resource available
                                      inside a container.
                                    type: string
                                  request:
                                    description: |-
                                      Request is the name chosen for a request in the referenced claim.
                                      If empty, everything from the claim is made available, otherwise
                                      only the result of this request.
                                    type: string
                                required:
                                - name
                                type: object
                              type: array
                              x-kubernetes-list-map-keys:
                              - name
                              x-kubernetes-list-type: map
                            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. Requests cannot exceed Limits.
                                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: {}
