---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.1
  name: o11yk8sagents.agent.observability.pingcap.com
spec:
  group: agent.observability.pingcap.com
  names:
    kind: O11yK8sAgent
    listKind: O11yK8sAgentList
    plural: o11yk8sagents
    singular: o11yk8sagent
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.o11y.projectId
      name: ProjectID
      type: string
    - jsonPath: .spec.o11y.tenantId
      name: TenantID
      type: string
    - jsonPath: .spec.kubernetesClusterName
      name: Cluster
      type: string
    - jsonPath: .status.phase
      name: Phase
      type: string
    - jsonPath: .metadata.creationTimestamp
      name: Age
      type: date
    name: v2
    schema:
      openAPIV3Schema:
        description: O11yK8sAgent is the Schema for the o11yk8sagents 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: O11yK8sAgentSpec defines the desired state of O11yK8sAgent.
            properties:
              aks:
                properties:
                  network:
                    type: string
                  subnetID:
                    type: string
                  subscriptionID:
                    type: string
                required:
                - network
                - subnetID
                - subscriptionID
                type: object
              eks:
                properties:
                  accountId:
                    type: string
                  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
                  project:
                    type: string
                  subnets:
                    items:
                      type: string
                    type: array
                required:
                - network
                - project
                - subnets
                type: object
              kubernetesClusterName:
                type: string
              o11y:
                properties:
                  applicationId:
                    type: string
                  bizType:
                    type: string
                  projectId:
                    type: string
                  tenantId:
                    type: string
                required:
                - applicationId
                - bizType
                - projectId
                - tenantId
                type: object
              pause:
                type: boolean
            required:
            - kubernetesClusterName
            - o11y
            type: object
          status:
            description: O11yK8sAgentStatus defines the observed state of O11yK8sAgent.
            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
            required:
            - phase
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
