apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: namespace-scanners.trivy-operator.devopstales.io
spec:
  conversion:
    strategy: None
  group: trivy-operator.devopstales.io
  names:
    kind: NamespaceScanner
    listKind: NamespaceScannerList
    plural: namespace-scanners
    shortNames:
    - ns-scan
    singular: namespace-scanner
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: Namespace Selector for pod scanning
      jsonPath: .spec.namespace_selector
      name: NamespaceSelector
      type: string
    - description: crontab value
      jsonPath: .spec.crontab
      name: Crontab
      type: string
    - description: As returned from the handler (sometimes).
      jsonPath: .status.create_fn.message
      name: Message
      type: string
    name: v1
    schema:
      openAPIV3Schema:
        properties:
          crontab:
            pattern: ^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$
            type: string
          namespace_selector:
            type: string
          spec:
            type: object
            x-kubernetes-preserve-unknown-fields: true
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
        type: object
    served: true
    storage: true
    subresources:
      status: {}
