apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: intrusions.pso.purestorage.com
spec:
  group: pso.purestorage.com
  names:
    kind: Intrusion
    listKind: IntrusionList
    plural: intrusions
    singular: intrusion
    categories:
    - all
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    storage: true
    subresources:
      status: {}
    additionalPrinterColumns:
    - description: The current status of the cluster
      jsonPath: .status.status
      name: Status
      type: string
    - description: The number of ready nodes in the cluster
      jsonPath: .status.readyNodes
      name: Ready
      type: string
    - description: The total number of ranges
      jsonPath: .status.totalRanges
      name: Ranges
      type: integer
    - description: The number of under-replicated ranges
      jsonPath: .status.underreplicatedRanges
      name: Under-Replicated
      type: integer
    - description: The number of unavailable ranges
      jsonPath: .status.unavailableRanges
      name: Unavailable
      type: integer
    - description: When the status was last updated
      jsonPath: .status.asOf
      name: As-Of
      type: string
    schema:
      openAPIV3Schema:
        type: object
        properties:
          apiVersion:
            type: string
          kind:
            type: string
          metadata:
            type: object
          spec:
            type: object
            properties:
              replicas:
                items:
                  properties:
                    apiToken:
                      type: string
                    backendID:
                      type: string
                    backendType:
                      enum:
                        - Ephemeral
                        - FlashArray
                        - FlashBlade
                        - PVC
                      type: string
                    mgmtEndpoint:
                      type: string
                    volume:
                      type: string
                  required:
                    - backendType
                    - volume
                  type: object
                type: array
            required:
              - replicas
          status:
            type: object
            properties:
              asOf:
                type: string
              initialized:
                type: boolean
              readyNodes:
                type: string
              replicas:
                items:
                  properties:
                    backendID:
                      type: string
                    backendType:
                      type: string
                    currentStatusStart:
                      type: string
                    decommission:
                      type: string
                    status:
                      type: string
                    volume:
                      type: string
                  required:
                    - backendType
                    - currentStatusStart
                    - status
                    - volume
                  type: object
                type: array
              status:
                type: string
              totalRanges:
                format: int64
                type: integer
              unavailableRanges:
                format: int64
                type: integer
              underreplicatedRanges:
                format: int64
                type: integer
