---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: streams.hadron.rs
spec:
  group: hadron.rs
  names:
    categories: []
    kind: Stream
    plural: streams
    shortNames:
      - stream
    singular: stream
  scope: Namespaced
  versions:
    - additionalPrinterColumns:
        - jsonPath: ".spec.partitions"
          name: Partitions
          type: number
        - jsonPath: ".spec.debug"
          name: Debug
          type: boolean
        - jsonPath: ".spec.retentionPolicy"
          name: Retention Policy
          type: string
        - jsonPath: ".spec.pvcVolumeSize"
          name: PVC Volume Size
          type: string
        - jsonPath: ".spec.pvcAccessModes"
          name: PVC Access Modes
          type: string
        - jsonPath: ".spec.pvcStorageClass"
          name: PVC Storage Class
          type: string
      name: v1beta1
      schema:
        openAPIV3Schema:
          description: "Auto-generated derived type for StreamSpec via `CustomResource`"
          properties:
            spec:
              description: CRD spec for the Stream resource.
              properties:
                debug:
                  default: false
                  description: "Enable debug mode for the Stream's StatefulSet pods."
                  type: boolean
                image:
                  description: "Force an exact image to be used for the backing StatefulSet.\n\nNormally this will should not be set, and the Operator will ensure that the most recent semver compatible image is being used."
                  type: string
                partitions:
                  description: "The number of partitions to be created for this stream.\n\nThis value can be dynamically scaled up and down and directly corresponds to the number of pods in the corresponding StatefulSet. Scaling down the number of partitions will cause the data of the removed partitions to be lost. Use with care."
                  format: uint32
                  minimum: 0.0
                  type: integer
                pvcAccessModes:
                  description: "The access modes to use for the Stream's backing StatefulSet PVCs."
                  items:
                    type: string
                  nullable: true
                  type: array
                pvcStorageClass:
                  description: "The storage class to use for the Stream's backing StatefulSet PVCs."
                  nullable: true
                  type: string
                pvcVolumeSize:
                  description: "The volume size to use for the Stream's backing StatefulSet PVCs."
                  type: string
                retentionPolicy:
                  default:
                    retentionSeconds: 604800
                    strategy: time
                  description: The retention policy to use for data on the Stream.
                  properties:
                    retentionSeconds:
                      description: "For `Time` retention policy, this specifies the amount of time to retain data on the Stream in seconds."
                      format: uint64
                      minimum: 0.0
                      nullable: true
                      type: integer
                    strategy:
                      description: Retention policy to use.
                      enum:
                        - retain
                        - time
                      type: string
                  required:
                    - strategy
                  type: object
              required:
                - image
                - partitions
                - pvcVolumeSize
              type: object
            status:
              description: CRD status object.
              nullable: true
              type: object
          required:
            - spec
          title: StreamCRD
          type: object
      served: true
      storage: true
      subresources:
        status: {}
