---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.4
  name: nodescores.serverless.pingcap.com
spec:
  group: serverless.pingcap.com
  names:
    kind: NodeScore
    listKind: NodeScoreList
    plural: nodescores
    singular: nodescore
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - jsonPath: .spec.cpu.weight
      name: CPU WEIGHT
      type: integer
    - jsonPath: .spec.cpu.evictThreshold
      name: CPU ET
      type: number
    - jsonPath: .spec.mem.weight
      name: MEM WEIGHT
      type: integer
    - jsonPath: .spec.mem.evictThreshold
      name: MEM ET
      type: number
    - format: date-time
      jsonPath: .status.updateTime
      name: UPTIME
      type: date
    name: v1alpha1
    schema:
      openAPIV3Schema:
        description: NodeScore is the Schema for the nodescores 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: NodeScoreSpec defines the desired state of NodeScore
            properties:
              cpu:
                description: CpuProfile defines the cpu profile
                properties:
                  evictThreshold:
                    maximum: 1
                    minimum: 0.5
                    type: number
                  weight:
                    minimum: 1
                    type: integer
                required:
                - evictThreshold
                - weight
                type: object
              mem:
                description: MemProfile defines the mem profile
                properties:
                  evictThreshold:
                    maximum: 1
                    minimum: 0.5
                    type: number
                  weight:
                    minimum: 1
                    type: integer
                required:
                - evictThreshold
                - weight
                type: object
            type: object
          status:
            description: |-
              NodeScoreStatus defines the observed state of NodeScore.
              It should always be reconstructable from the state of the cluster and/or outside world.
            properties:
              nodeNeedEvict:
                description: EvictType defines the observed need evict information
                properties:
                  cpu:
                    additionalProperties:
                      type: number
                    type: object
                  mem:
                    additionalProperties:
                      type: number
                    type: object
                type: object
              resourceNodeScore:
                additionalProperties:
                  type: integer
                type: object
              schedulerNodeScore:
                additionalProperties:
                  type: integer
                type: object
              updateTime:
                format: date-time
                type: string
            type: object
        required:
        - spec
        type: object
    served: true
    storage: true
    subresources:
      status: {}
