apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: triadsets.sigproc.viasat.io
spec:
  group: sigproc.viasat.io
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              required:
              - replicas
              - selector
              - template
              - serviceName              
              properties:
                image:
                  type: string
                replicas:
                  type: integer
                  minimum: 0
                  default: 1
                template:
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                selector:
                  type: object
                  x-kubernetes-preserve-unknown-fields: true
                serviceName:
                  type: string      
                podManagementPolicy: # Not respected yet
                  type: string                    
                updateStrategy: # Not respected yet
                  type: object
                  x-kubernetes-preserve-unknown-fields: true                                              
            status:
              type: object
              properties:
                replicas:
                  type: integer
                labelSelector:
                  type: string
      additionalPrinterColumns:
      - name: Desired
        type: integer
        jsonPath: .spec.replicas
      - name: Current
        type: integer
        jsonPath: .status.readyReplicas
      - name: Age
        type: date
        jsonPath: .metadata.creationTimestamp
      subresources:
        status: {}
        scale:
          specReplicasPath: .spec.replicas
          statusReplicasPath: .status.replicas
          labelSelectorPath: .status.labelSelector
  scope: Namespaced
  names:
    plural: triadsets
    singular: triadset
    kind: TriadSet
    shortNames:
    - ts
    categories:
    - sigproc
    - all