# Copyright (c) 2021 SIGHUP s.r.l All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: checkresults.kfip.sighup.io
spec:
  scope: Namespaced
  group: kfip.sighup.io
  versions:
    - name: v1beta1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          required:
            - spec
          properties:
            spec:
              type: object
              required:
                - group
                - target
                - namespace
                - checkName
                - owner
                - frequency
              properties:
                group:
                  type: string
                target:
                  type: string
                startTime:
                  type: string
                completedAt:
                  type: string
                duration:
                  type: string
                status:
                  type: string
                namespace:
                  type: string
                podName:
                  type: string
                owner:
                  type: string
                checkName:
                  type: string
                error:
                  type: string
                frequency:
                  type: integer
  names:
    kind: CheckResult
    plural: checkresults
    singular: checkresult
