---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: kubehunterreports.aquasecurity.github.io
  labels:
    app.kubernetes.io/managed-by: starboard
    app.kubernetes.io/version: "0.15.24"
spec:
  group: aquasecurity.github.io
  versions:
    - name: v1alpha1
      served: true
      storage: true
      additionalPrinterColumns:
        - jsonPath: ".report.scanner.name"
          name: "Scanner"
          type: "string"
        - jsonPath: ".metadata.creationTimestamp"
          name: "Age"
          type: "date"
        - jsonPath: ".report.summary.highCount"
          name: "High"
          type: "integer"
          priority: 1
        - jsonPath: ".report.summary.mediumCount"
          name: "Medium"
          type: "integer"
          priority: 1
        - jsonPath: ".report.summary.lowCount"
          name: "Low"
          type: "integer"
          priority: 1
      schema:
        openAPIV3Schema:
          type: object
          required:
            - apiVersion
            - kind
            - metadata
            - report
          properties:
            apiVersion:
              type: string
            kind:
              type: string
            metadata:
              type: object
            report:
              type: object
              required:
                - scanner
                - summary
                - vulnerabilities
              properties:
                scanner:
                  type: object
                  required:
                    - name
                    - vendor
                    - version
                  properties:
                    name:
                      type: string
                    vendor:
                      type: string
                    version:
                      type: string
                summary:
                  type: object
                  required:
                    - highCount
                    - mediumCount
                    - lowCount
                    - unknownCount
                  properties:
                    highCount:
                      type: integer
                      minimum: 0
                    mediumCount:
                      type: integer
                      minimum: 0
                    lowCount:
                      type: integer
                      minimum: 0
                    unknownCount:
                      type: integer
                      minimum: 0
                vulnerabilities:
                  type: array
                  items:
                    type: object
                    required:
                      - location
                      - vid
                      - category
                      - severity
                      - vulnerability
                      - description
                      - evidence
                      - avd_reference
                    properties:
                      location:
                        type: string
                      vid:
                        type: string
                      category:
                        type: string
                      vulnerability:
                        type: string
                      severity:
                        type: string
                        enum:
                          - high
                          - medium
                          - low
                          - unknown
                      description:
                        type: string
                      evidence:
                        type: string
                      avd_reference:
                        type: string
  scope: Cluster
  names:
    singular: kubehunterreport
    plural: kubehunterreports
    kind: KubeHunterReport
    listKind: KubeHunterReportList
    categories: []
    shortNames:
      - kubehunter