---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: falconsensors.falcon.crowdstrike.com
spec:
  group: falcon.crowdstrike.com
  names:
    kind: FalconSensor
    listKind: FalconSensorList
    plural: falconsensors
    singular: falconsensor
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    storage: true
    subresources:
      status: {}
    schema:
      openAPIV3Schema:
        type: object
        description: FalconSensor is the Schema for the falconsensors 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:
            type: object
            required:
              - falcon
            description: Spec defines the desired state of FalconSensor
            properties:
              falcon:
                type: object
                description: CrowdStrike Falcon sensor configuration
                properties:
                  cid:
                    description: Falcon Customer ID (CID)
                    pattern: ^[0-9a-fA-F]{32}-[0-9a-fA-F]{2}$
                    type: string
                  apd:
                    description: Enable the App Proxy Port (APP). Uncommon in container-based deployments.
                    default: false
                    type: boolean
                  aph:
                    description: App Proxy Hostname (APH). Uncommon in container-based deployments.
                    type: string
                  app:
                    description: App Proxy Port (APP). Uncommon in container-based deployments.
                    type: string
                  billing:
                    description: Utilize default or metered billing
                    type: string
                    enum:
                      - default
                      - metered
                  feature:
                    description: "Options to pass to the \"--feature\" flag. Options are [none,[enableLog[,disableLogBuffer[,disableOsfm[,emulateUpdate]]]]]"
                    type: string
                  message_log:
                    description: Enable message log for logging to disk
                    default: false
                    type: boolean
                  provisioning_token:
                    description: Provisioning token value
                    type: string
                  tags:
                    description: "Comma separated list of tags for sensor grouping. Allowed characters: all alphanumerics, '/', '-', '_', and ','."
                    type: string
                  trace:
                    description: Set trace level. Options are [none|err|warn|info|debug].
                    type: string
                    enum:
                      - none
                      - err
                      - warn
                      - info
                      - debug
                required:
                - cid
              container:
                type: object
                description: "Falcon Container Sensor (sidecar) for Kubernetes Pods"
                properties:
                  enabled:
                    description: "Enable the Falcon Container Sensor"
                    default: false
                    type: boolean
                  certExpiration:
                    description: Webook Certificate Authority Expiration (in days)
                    default: 3650
                    pattern: ^[0-9]+$
                    type: integer
                  disableNSInjection:
                    description: Disable sensor injection for all namespaces
                    default: false
                    type: boolean
                  disablePodInjection:
                    description: Disable sensor injection for all pods
                    default: false
                    type: boolean
                  image:
                    type: object
                    description: Falcon Container Sensor image configuration for Kubernetes Pods
                    properties:
                      repository:
                        description: Repository to pull Falcon Sensor for the nodes
                        default: falcon-sensor
                        type: string
                      tag:
                        description: Image tag to use for the Falcon Sensor version
                        default: latest
                        type: string
                      pullPolicy:
                        description: Image pull policy
                        default: Always
                        type: string
                        enum:
                          - Always
                          - Never
                          - IfNotPresent
                      pullSecrets:
                        type: object
                        description: Container image configuration
                        properties:
                          enable:
                            description: Connect to registry that requires authentication
                            default: false
                            type: boolean
                          namespaces:
                            description: Comma separated list of namespaces allowed to pull Falcon Sensor
                            type: string
                          registryConfigJSON:
                            description: A base64-encoded string of the Docker config JSON of the registry pull secret
                            type: string
                    required:
                    - repository
                    - tag

                  resources:
                    type: object
                    description: Resource configuration for the Falcon Injector Pod
                    properties:
                      requests:
                        type: object
                        description: Default mimimum resource requests for the Falcon Injector Pod
                        properties:
                          cpu:
                            description: Minimum CPU request (in millicpu)
                            default: 10m
                            type: string
                          memory:
                            description: Minimum memory request (in bytes)
                            default: 20Mi
                            type: string
                required:
                - enabled

              node:
                type: object
                description: "Falcon Sensor for Kubernetes Nodes"
                properties:
                  enabled:
                    description: "Enable the Falcon Sensor for Kubernetes Nodes"
                    default: true
                    type: boolean
                  image:
                    type: object
                    description: Falcon Sensor image configuration for Kubernetes Nodes
                    properties:
                      repository:
                        description: Repository to pull Falcon Sensor for the nodes
                        default: falcon-node-sensor
                        type: string
                      tag:
                        description: Image tag to use for the Falcon Sensor version
                        default: latest
                        type: string
                      pullPolicy:
                        description: Image pull policy
                        default: Always
                        type: string
                        enum:
                          - Always
                          - Never
                          - IfNotPresent
                      #pullSecrets: {}
                    required:
                    - repository
                    - tag

                  daemonset:
                    type: object
                    description: "Falcon Sensor Daemonset configuration"
                    properties:
                      #annotations: {}
                      #labels: {}
                      #tolerations: []
                      updateStrategy:
                        description: Kubernetes update methodology for Daemonsets
                        default: RollingUpdate
                        type: string
                        enum:
                          - RollingUpdate
                          - OnDelete
                  terminationGracePeriod:
                    description: Grace period (in seconds) to cleanly shutdown pods
                    default: 10
                    pattern: ^[0-9]+$
                    type: integer
                required:
                - enabled
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
