# Copyright 2020 NVIDIA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: sriovibnetworks.sriovnetwork.openshift.io
spec:
  group: sriovnetwork.openshift.io
  names:
    kind: SriovIBNetwork
    listKind: SriovIBNetworkList
    plural: sriovibnetworks
    singular: sriovibnetwork
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        description: SriovIBNetwork is the Schema for the sriovibnetworks 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: SriovIBNetworkSpec defines the desired state of SriovIBNetwork
            properties:
              capabilities:
                description: 'Capabilities to be configured for this network. Capabilities
                  supported: (infinibandGUID), e.g. ''{"infinibandGUID": true}'''
                type: string
              ipam:
                description: IPAM configuration to be used for this network.
                type: string
              linkState:
                description: VF link state (enable|disable|auto)
                enum:
                - auto
                - enable
                - disable
                type: string
              metaPlugins:
                description: MetaPluginsConfig configuration to be used in order to
                  chain metaplugins to the sriov interface returned by the operator.
                type: string
              networkNamespace:
                description: Namespace of the NetworkAttachmentDefinition custom resource
                type: string
              resourceName:
                description: SRIOV Network device plugin endpoint resource name
                type: string
            required:
            - resourceName
            type: object
          status:
            description: SriovIBNetworkStatus defines the observed state of SriovIBNetwork
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
