---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.19.0
  name: remotecollectors.troubleshoot.sh
spec:
  group: troubleshoot.sh
  names:
    kind: RemoteCollector
    listKind: RemoteCollectorList
    plural: remotecollectors
    singular: remotecollector
  scope: Namespaced
  versions:
  - name: v1beta2
    schema:
      openAPIV3Schema:
        description: RemoteCollector is the Schema for the remote collectors 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: RemoteCollectorSpec defines the desired state of the RemoteCollector
            properties:
              afterCollection:
                items:
                  properties:
                    callback:
                      properties:
                        method:
                          type: string
                        redactUri:
                          type: string
                        uri:
                          type: string
                      required:
                      - method
                      - redactUri
                      - uri
                      type: object
                    uploadResultsTo:
                      properties:
                        method:
                          type: string
                        redactUri:
                          type: string
                        uri:
                          type: string
                      required:
                      - method
                      - redactUri
                      - uri
                      type: object
                  type: object
                type: array
              collectors:
                items:
                  properties:
                    blockDevices:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    certificate:
                      properties:
                        certificatePath:
                          type: string
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                        keyPath:
                          type: string
                      required:
                      - certificatePath
                      - keyPath
                      type: object
                    cpu:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    diskUsage:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                        path:
                          type: string
                      required:
                      - path
                      type: object
                    filesystemPerformance:
                      description: |-
                        RemoteFilesystemPerformance benchmarks sequential write latency on a single file.
                        The optional background IOPS feature attempts to mimic real-world conditions by running read and
                        write workloads prior to and during benchmark execution.
                      properties:
                        backgroundIOPSWarmupSeconds:
                          description: How long to run the background IOPS read and
                            write workloads prior to starting the benchmarks.
                          type: integer
                        backgroundReadIOPS:
                          description: |-
                            The target read IOPS to run while benchmarking. This is a limit and there is no guarantee
                            it will be reached. This is the total IOPS for all background read jobs.
                          type: integer
                        backgroundReadIOPSJobs:
                          description: |-
                            Number of threads to use for background read IOPS. This should be set high enough to reach
                            the target specified in BackgrounReadIOPS.
                          type: integer
                        backgroundWriteIOPS:
                          description: |-
                            The target write IOPS to run while benchmarking. This is a limit and there is no guarantee
                            it will be reached. This is the total IOPS for all background write jobs.
                          type: integer
                        backgroundWriteIOPSJobs:
                          description: |-
                            Number of threads to use for background write IOPS. This should be set high enough to reach
                            the target specified in BackgroundWriteIOPS.
                            Example: If BackgroundWriteIOPS is 100 and write latency is 10ms then a single job would
                            barely be able to reach 100 IOPS so this should be at least 2.
                          type: integer
                        collectorName:
                          type: string
                        datasync:
                          description: |-
                            Whether to call datasync on the file after each write. Skipped if Sync is also true. Does not
                            apply to background IOPS task.
                          type: boolean
                        directory:
                          description: The directory where the benchmark will create
                            files.
                          type: string
                        enableBackgroundIOPS:
                          description: Enable the background IOPS feature.
                          type: boolean
                        exclude:
                          type: BoolString
                        fileSize:
                          description: |-
                            The size of the file used in the benchmark. The number of IO operations for the benchmark
                            will be FileSize / OperationSizeBytes. Accepts valid Kubernetes resource units such as Mi.
                          type: string
                        operationSize:
                          description: |-
                            The size of each write operation performed while benchmarking. This does not apply to the
                            background IOPS feature if enabled, since those must be fixed at 4096.
                          format: int64
                          type: integer
                        runTime:
                          description: |-
                            Limit runtime. The test will run until it completes the configured I/O workload or until it
                            has run for this specified amount of time, whichever occurs first. When the unit is omitted,
                            the value is interpreted in seconds. Defaults to 120 seconds. Set to "0" to disable.
                          type: string
                        sync:
                          description: Whether to call sync on the file after each
                            write. Does not apply to background IOPS task.
                          type: boolean
                        timeout:
                          description: Total timeout, including background IOPS setup
                            and warmup if enabled.
                          type: string
                      required:
                      - backgroundIOPSWarmupSeconds
                      - backgroundReadIOPS
                      - backgroundReadIOPSJobs
                      - backgroundWriteIOPS
                      - backgroundWriteIOPSJobs
                      - enableBackgroundIOPS
                      type: object
                    hostOS:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    hostServices:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    http:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                        get:
                          properties:
                            headers:
                              additionalProperties:
                                type: string
                              type: object
                            insecureSkipVerify:
                              type: boolean
                            proxy:
                              type: string
                            timeout:
                              description: |-
                                Timeout is the time to wait for a server's response. Its a duration e.g 15s, 2h30m.
                                Missing value or empty string or means no timeout.
                              type: string
                            tls:
                              properties:
                                cacert:
                                  type: string
                                clientCert:
                                  type: string
                                clientKey:
                                  type: string
                                secret:
                                  properties:
                                    name:
                                      type: string
                                    namespace:
                                      type: string
                                  required:
                                  - name
                                  - namespace
                                  type: object
                                skipVerify:
                                  type: boolean
                              type: object
                            url:
                              type: string
                          required:
                          - url
                          type: object
                        post:
                          properties:
                            body:
                              type: string
                            headers:
                              additionalProperties:
                                type: string
                              type: object
                            insecureSkipVerify:
                              type: boolean
                            proxy:
                              type: string
                            timeout:
                              description: |-
                                Timeout is the time to wait for a server's response. Its a duration e.g 15s, 2h30m.
                                Missing value or empty string or means no timeout.
                              type: string
                            tls:
                              properties:
                                cacert:
                                  type: string
                                clientCert:
                                  type: string
                                clientKey:
                                  type: string
                                secret:
                                  properties:
                                    name:
                                      type: string
                                    namespace:
                                      type: string
                                  required:
                                  - name
                                  - namespace
                                  type: object
                                skipVerify:
                                  type: boolean
                              type: object
                            url:
                              type: string
                          required:
                          - url
                          type: object
                        put:
                          properties:
                            body:
                              type: string
                            headers:
                              additionalProperties:
                                type: string
                              type: object
                            insecureSkipVerify:
                              type: boolean
                            proxy:
                              type: string
                            timeout:
                              description: |-
                                Timeout is the time to wait for a server's response. Its a duration e.g 15s, 2h30m.
                                Missing value or empty string or means no timeout.
                              type: string
                            tls:
                              properties:
                                cacert:
                                  type: string
                                clientCert:
                                  type: string
                                clientKey:
                                  type: string
                                secret:
                                  properties:
                                    name:
                                      type: string
                                    namespace:
                                      type: string
                                  required:
                                  - name
                                  - namespace
                                  type: object
                                skipVerify:
                                  type: boolean
                              type: object
                            url:
                              type: string
                          required:
                          - url
                          type: object
                      type: object
                    httpLoadBalancer:
                      properties:
                        address:
                          type: string
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                        path:
                          type: string
                        port:
                          type: integer
                        timeout:
                          type: string
                      required:
                      - address
                      - path
                      - port
                      type: object
                    ipv4Interfaces:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    kernelModules:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    memory:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    subnetAvailable:
                      properties:
                        CIDRRangeAlloc:
                          type: string
                        collectorName:
                          type: string
                        desiredCIDR:
                          type: integer
                        exclude:
                          type: BoolString
                      required:
                      - CIDRRangeAlloc
                      - desiredCIDR
                      type: object
                    systemPackages:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    tcpConnect:
                      properties:
                        address:
                          type: string
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                        timeout:
                          type: string
                      required:
                      - address
                      type: object
                    tcpLoadBalancer:
                      properties:
                        address:
                          type: string
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                        port:
                          type: integer
                        timeout:
                          type: string
                      required:
                      - address
                      - port
                      type: object
                    tcpPortStatus:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                        interface:
                          type: string
                        port:
                          type: integer
                      required:
                      - port
                      type: object
                    time:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                      type: object
                    udpPortStatus:
                      properties:
                        collectorName:
                          type: string
                        exclude:
                          type: BoolString
                        interface:
                          type: string
                        port:
                          type: integer
                      required:
                      - port
                      type: object
                  type: object
                type: array
              nodeSelector:
                additionalProperties:
                  type: string
                type: object
              uri:
                type: string
            type: object
          status:
            description: CollectorStatus defines the observed state of Collector
            type: object
        type: object
    served: true
    storage: true
