---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: lsfclusters.lsf.spectrumcomputing.ibm.com
  labels:
    app.kubernetes.io/name: "ibm-spectrum-lsf"
    app.kubernetes.io/managed-by: "lsfclusters.lsf.spectrumcomputing.ibm.com"
    app.kubernetes.io/instance: "lsfcrd"
spec:
  group: lsf.spectrumcomputing.ibm.com
  names:
    kind: LSFCluster
    listKind: LSFClusterList
    plural: lsfclusters
    singular: lsfcluster
    shortNames:
      - lsfs
  scope: Namespaced
  versions:
  - name: v1
    served: true
    storage: true
    subresources:
      status: {}
    schema:
      openAPIV3Schema:
        type: object
        properties:
          apiVersion:
            type: string
            description: "apiVersion defines the versioned schema of this representation of an object"
          kind:
            type: string
            description: "This CRD is for the LSFCluster kind"
          metadata:
            type: object
          status:
            type: object
            x-kubernetes-preserve-unknown-fields: true
            description: "Subresources for status"
            properties:
              conditions:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      description: Message
                      type: string
                    reason:
                      description: Reason
                      type: string
                    status:
                      description: Status of the condition
                      type: string
                    type:
                      description: Type of the cluster condition
                      type: string
          spec:
            description: "Contains specifications for an LSF cluster"
            type: object
            x-kubernetes-preserve-unknown-fields: true
            properties:
              licenseAccepted:
                type: boolean
                description: "Indicate acceptance of the licences"
              networking:
                type: string
                description: "This controls the type of networking used"
              imagepullsecret:
                type: string
                description: "The imagePullSecret to use to get images from a private registry"
              cluster:
                description: "These are cluster wide configuration parameters"
                type: object
                properties:
                  clustername:
                    type: string
                    description: "Prefix for objects created for this cluster"
                  administrators:
                    description: "A list of LSF administrators"
                    type: array
                    items:
                      type: string
                  lsfpvcname:
                    description: "Storage for LSF failover"
                    type: string
                  volumes:
                    description: "List of additional volumes to mpount to all LSF pods"
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        mount:
                          type: string
                        pvcname:
                          type: string
                  userauth:
                    description: "Configutation for providing user authentication within pods"
                    type: object
                    properties:
                      authconfigargs:
                        type: string
                      configs:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            filename:
                              type: string
                            permission:
                              type: integer
                      starts:
                        description: "List of daemons to start for authentication"
                        type: array
                        items:
                          type: string
              master:
                description: "Configuration for the master pod"
                type: object
                properties:
                  image:
                    type: string
                  imagePullPolicy:
                    type: string
                  replicas:
                    type: integer
                    minimum: 0
                    maximum: 1
                  placement:
                    type: object
                    properties:
                      includeLabel:
                        type: string
                      excludeLabel:
                        type: string
                      tolerateName:
                        type: string
                      tolerateValue:
                        type: string
                      tolerateEffect:
                        type: string
                  resources:
                    type: object
                    properties:
                      requests:
                        type: object
                        properties:
                          cpu:
                            type: string
                          memory:
                            type: string
                      limits:
                        type: object
                        properties:
                          cpu:
                            type: string
                          memory:
                            type: string
                  mountList:
                    type: array
                    items:
                      type: string
              gui:
                description: "Configuration for the GUI pod"
                type: object
                properties:
                  image:
                    type: string
                  imagePullPolicy:
                    type: string
                  replicas:
                    type: integer
                    minimum: 0
                    maximum: 1
                  db:
                    type: object
                    properties:
                      image:
                        type: string
                      imagePullPolicy:
                        type: string
                      cpu:
                        type: string
                      memory:
                        type: string
                      passwordSecret:
                        type: string
                  placement:
                    type: object
                    properties:
                      includeLabel:
                        type: string
                      excludeLabel:
                        type: string
                      tolerateName:
                        type: string
                      tolerateValue:
                        type: string
                      tolerateEffect:
                        type: string
                  resources:
                    type: object
                    properties:
                      requests:
                        type: object
                        properties:
                          cpu:
                            type: string
                          memory:
                            type: string
                      limits:
                        type: object
                        properties:
                          cpu:
                            type: string
                          memory:
                            type: string
                  mountList:
                    type: array
                    items:
                      type: string

              computes:
                description: "Configuration for the list of compute types"
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    description:
                      type: string
                    provider:
                      type: array
                      items:
                        type: string
                    image:
                      type: string
                    imagePullPolicy:
                      type: string
                    replicas:
                      type: integer
                      minimum: 0
                      maximum: 10
                    placement:
                      type: object
                      properties:
                        includeLabel:
                          type: string
                        excludeLabel:
                          type: string
                        tolerateName:
                          type: string
                        tolerateValue:
                          type: string
                        tolerateEffect:
                          type: string
                    resources:
                      type: object
                      properties:
                        requests:
                          type: object
                          properties:
                            cpu:
                              type: string
                            memory:
                              type: string
                        limits:
                          type: object
                          properties:
                            cpu:
                              type: string
                            memory:
                              type: string
                        gpu:
                          type: string
                    mountList:
                      type: array
                      items:
                        type: string

