apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: hpecpmodeldefaults.deployment.hpe.com
spec:
  group: deployment.hpe.com
  names:
    kind: HPECPModelDefault
    listKind: HPECPModelDefaultList
    plural: hpecpmodeldefaults
    singular: hpecpmodeldefault
    shortNames:
      - modeldefault
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: HPECPModelDefault is the Schema for the hpecpmodeldefaults 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: HPECPModelDefaultSpec defines the desired state of HPECPModelDefault
            type: object
            properties:
              defaultconnections:
                description: This default sets default connection object to the model object.
                type: object
                properties:
                  configmaps:
                    type: array
                    items:
                      type: string
                  secrets:
                    type: array
                    items:
                      type: string
              defaultenv:
                description: This field sets the default environment for every seldon deployment that shall be created using this CR.
                type: array
                items:
                  type: object
                  required: [name, value]
                  properties:
                    name:
                      type: string
                      minLength: 1
                    value:
                      type: string
            
              defaultresources:
                description: This field describes the default resource quota for svcOrchSpec and seldon pods.
                type: object
                required: [limits]
                properties:
                  limits:
                    type: object
                    required: [cpu]
                    properties:
                      memory:
                        type: string
                        pattern: '^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
                      cpu:
                        type: string
                        pattern: '^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
                      nvidia.com/gpu:
                        type: string
                        pattern: '^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
                      amd.com/gpu:
                        type: string
                        pattern: '^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
                      ephemeral-storage:                      
                        type: string
                        pattern: '^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
                  requests:
                    type: object
                    nullable: true
                    properties:
                      memory:
                        type: string
                        pattern: '^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
                      cpu:
                        type: string
                        pattern: '^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
                      ephemeral-storage:
                        type: string
                        pattern: '^([0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
          status:
            description: HPECPModelDefaultStatus defines the observed state of HPECPModelDefault
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
