diff --git a/api/nvidia.com/resource/gpu/nas/v1alpha1/zz_generated.deepcopy.go b/api/nvidia.com/resource/gpu/nas/v1alpha1/zz_generated.deepcopy.go index 7e28683d..90e87161 100644 --- a/api/nvidia.com/resource/gpu/nas/v1alpha1/zz_generated.deepcopy.go +++ b/api/nvidia.com/resource/gpu/nas/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. diff --git a/api/nvidia.com/resource/gpu/v1alpha1/zz_generated.deepcopy.go b/api/nvidia.com/resource/gpu/v1alpha1/zz_generated.deepcopy.go index 75d3b27f..9e403b70 100644 --- a/api/nvidia.com/resource/gpu/v1alpha1/zz_generated.deepcopy.go +++ b/api/nvidia.com/resource/gpu/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. diff --git a/api/utils/selector/zz_generated.deepcopy.go b/api/utils/selector/zz_generated.deepcopy.go index 90edc8c7..3a9c3abb 100644 --- a/api/utils/selector/zz_generated.deepcopy.go +++ b/api/utils/selector/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. diff --git a/demo/clusters/kind/scripts/build-driver-image.sh b/demo/clusters/kind/scripts/build-driver-image.sh index a43c8c20..69612eed 100755 --- a/demo/clusters/kind/scripts/build-driver-image.sh +++ b/demo/clusters/kind/scripts/build-driver-image.sh @@ -36,6 +36,7 @@ cd ${PROJECT_DIR} # Regenerate the CRDs and build the container image # TODO: This should be part of the image name make docker-generate +make build-image make -f deployments/container/Makefile build cd ${CURRENT_DIR} diff --git a/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_computeinstanceclaimparameters.yaml b/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_computeinstanceclaimparameters.yaml index b4f651f7..3d03187a 100644 --- a/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_computeinstanceclaimparameters.yaml +++ b/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_computeinstanceclaimparameters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: computeinstanceclaimparameters.gpu.resource.nvidia.com spec: group: gpu.resource.nvidia.com @@ -22,14 +21,19 @@ spec: when creating a resource claim for a Compute Instance. 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' + 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' + 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 diff --git a/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_deviceclassparameters.yaml b/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_deviceclassparameters.yaml index 9987011d..25f5472f 100644 --- a/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_deviceclassparameters.yaml +++ b/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_deviceclassparameters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: deviceclassparameters.gpu.resource.nvidia.com spec: group: gpu.resource.nvidia.com @@ -22,14 +21,19 @@ spec: creating a resource class for this driver. 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' + 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' + 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 diff --git a/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_gpuclaimparameters.yaml b/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_gpuclaimparameters.yaml index 66218ade..8b2666dd 100644 --- a/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_gpuclaimparameters.yaml +++ b/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_gpuclaimparameters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: gpuclaimparameters.gpu.resource.nvidia.com spec: group: gpu.resource.nvidia.com @@ -22,14 +21,19 @@ spec: creating a resource claim for a GPU. 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' + 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' + 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 @@ -43,13 +47,16 @@ spec: allOf: - maxProperties: 1 - maxProperties: 1 - description: "GpuSelector defines the set of conditions that can be - used to select a specific GPU. This condition can either be a single - property from the set of available GpuSelectorProperties or a nested - list of GpuSelectors that are 'anded' or 'ored' together. \n NOTE: - Because CRDs do not allow recursively defined structs, we explicitly - define up to 3 levels of nesting. This is done by defining new types - with the same fields as this struct, up to 3 levels deep." + description: |- + GpuSelector defines the set of conditions that can be used to select a + specific GPU. This condition can either be a single property from the set + of available GpuSelectorProperties or a nested list of GpuSelectors that are + 'anded' or 'ored' together. + + + NOTE: Because CRDs do not allow recursively defined structs, we explicitly + define up to 3 levels of nesting. This is done by defining new types with + the same fields as this struct, up to 3 levels deep. properties: andExpression: items: @@ -1650,21 +1657,17 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: DefaultPerDevicePinnedMemoryLimit represents - the pinned memory limit per device associated with an MPS - daemon. This is defined as a map of device index or UUI - to a memory limit and overrides a setting applied using - DefaultPinnedDeviceMemoryLimit. + description: |- + DefaultPerDevicePinnedMemoryLimit represents the pinned memory limit per device associated with an MPS daemon. + This is defined as a map of device index or UUI to a memory limit and overrides a setting applied using DefaultPinnedDeviceMemoryLimit. type: object defaultPinnedDeviceMemoryLimit: anyOf: - type: integer - type: string - description: DefaultPinnedDeviceMemoryLimit represents the - pinned memory limit to be applied for all devices. This - can be overridden for specific devices by specifying an - associated entry DefaultPerDevicePinnedMemoryLimit for the - device. + description: |- + DefaultPinnedDeviceMemoryLimit represents the pinned memory limit to be applied for all devices. + This can be overridden for specific devices by specifying an associated entry DefaultPerDevicePinnedMemoryLimit for the device. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object diff --git a/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_migdeviceclaimparameters.yaml b/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_migdeviceclaimparameters.yaml index 25aa0133..9d7fe9ac 100644 --- a/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_migdeviceclaimparameters.yaml +++ b/deployments/helm/k8s-dra-driver/crds/gpu.resource.nvidia.com_migdeviceclaimparameters.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: migdeviceclaimparameters.gpu.resource.nvidia.com spec: group: gpu.resource.nvidia.com @@ -22,14 +21,19 @@ spec: when creating a resource claim for a MIG device. 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' + 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' + 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 @@ -59,21 +63,17 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: DefaultPerDevicePinnedMemoryLimit represents - the pinned memory limit per device associated with an MPS - daemon. This is defined as a map of device index or UUI - to a memory limit and overrides a setting applied using - DefaultPinnedDeviceMemoryLimit. + description: |- + DefaultPerDevicePinnedMemoryLimit represents the pinned memory limit per device associated with an MPS daemon. + This is defined as a map of device index or UUI to a memory limit and overrides a setting applied using DefaultPinnedDeviceMemoryLimit. type: object defaultPinnedDeviceMemoryLimit: anyOf: - type: integer - type: string - description: DefaultPinnedDeviceMemoryLimit represents the - pinned memory limit to be applied for all devices. This - can be overridden for specific devices by specifying an - associated entry DefaultPerDevicePinnedMemoryLimit for the - device. + description: |- + DefaultPinnedDeviceMemoryLimit represents the pinned memory limit to be applied for all devices. + This can be overridden for specific devices by specifying an associated entry DefaultPerDevicePinnedMemoryLimit for the device. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object diff --git a/deployments/helm/k8s-dra-driver/crds/nas.gpu.resource.nvidia.com_nodeallocationstates.yaml b/deployments/helm/k8s-dra-driver/crds/nas.gpu.resource.nvidia.com_nodeallocationstates.yaml index 80a02cd5..27030e84 100644 --- a/deployments/helm/k8s-dra-driver/crds/nas.gpu.resource.nvidia.com_nodeallocationstates.yaml +++ b/deployments/helm/k8s-dra-driver/crds/nas.gpu.resource.nvidia.com_nodeallocationstates.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.9.2 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.14.0 name: nodeallocationstates.nas.gpu.resource.nvidia.com spec: group: nas.gpu.resource.nvidia.com @@ -22,14 +21,19 @@ spec: a node. 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' + 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' + 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 @@ -151,21 +155,17 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: DefaultPerDevicePinnedMemoryLimit represents - the pinned memory limit per device associated - with an MPS daemon. This is defined as a map of - device index or UUI to a memory limit and overrides - a setting applied using DefaultPinnedDeviceMemoryLimit. + description: |- + DefaultPerDevicePinnedMemoryLimit represents the pinned memory limit per device associated with an MPS daemon. + This is defined as a map of device index or UUI to a memory limit and overrides a setting applied using DefaultPinnedDeviceMemoryLimit. type: object defaultPinnedDeviceMemoryLimit: anyOf: - type: integer - type: string - description: DefaultPinnedDeviceMemoryLimit represents - the pinned memory limit to be applied for all - devices. This can be overridden for specific devices - by specifying an associated entry DefaultPerDevicePinnedMemoryLimit - for the device. + description: |- + DefaultPinnedDeviceMemoryLimit represents the pinned memory limit to be applied for all devices. + This can be overridden for specific devices by specifying an associated entry DefaultPerDevicePinnedMemoryLimit for the device. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object @@ -247,21 +247,17 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: DefaultPerDevicePinnedMemoryLimit represents - the pinned memory limit per device associated - with an MPS daemon. This is defined as a map of - device index or UUI to a memory limit and overrides - a setting applied using DefaultPinnedDeviceMemoryLimit. + description: |- + DefaultPerDevicePinnedMemoryLimit represents the pinned memory limit per device associated with an MPS daemon. + This is defined as a map of device index or UUI to a memory limit and overrides a setting applied using DefaultPinnedDeviceMemoryLimit. type: object defaultPinnedDeviceMemoryLimit: anyOf: - type: integer - type: string - description: DefaultPinnedDeviceMemoryLimit represents - the pinned memory limit to be applied for all - devices. This can be overridden for specific devices - by specifying an associated entry DefaultPerDevicePinnedMemoryLimit - for the device. + description: |- + DefaultPinnedDeviceMemoryLimit represents the pinned memory limit to be applied for all devices. + This can be overridden for specific devices by specifying an associated entry DefaultPerDevicePinnedMemoryLimit for the device. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object diff --git a/go.mod b/go.mod index 03f0cd1d..9ffdab44 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/NVIDIA/k8s-dra-driver -go 1.20 +go 1.22 require ( github.com/NVIDIA/go-nvlib v0.0.0-20231116150931-9fd385bace0d @@ -20,6 +20,7 @@ require ( k8s.io/klog/v2 v2.110.1 k8s.io/kubelet v0.29.2 k8s.io/mount-utils v0.29.2 + k8s.io/utils v0.0.0-20230726121419-3b25d923346b tags.cncf.io/container-device-interface v0.6.2 tags.cncf.io/container-device-interface/specs-go v0.6.0 ) @@ -82,7 +83,6 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect - k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/go.sum b/go.sum index 80a424a2..04519f33 100644 --- a/go.sum +++ b/go.sum @@ -36,6 +36,7 @@ github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= @@ -54,10 +55,12 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= +github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/imdario/mergo v0.3.6 h1:xTNEAn+kxVO7dTZGu0CegyqKZmoWFI0rF8UxjlB2d28= @@ -73,6 +76,7 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -91,7 +95,9 @@ github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2 github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= +github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.29.0 h1:KIA/t2t5UBzoirT4H9tsML45GEbo3ouUnBHsCfD2tVg= +github.com/onsi/gomega v1.29.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ= github.com/opencontainers/runtime-spec v1.0.3-0.20220825212826-86290f6a00fb/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= @@ -99,6 +105,7 @@ github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 h1: github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626/go.mod h1:BRHJJd0E+cx42OybVYSgUvZmU0B8P9gZuRXlZUP7TKI= github.com/opencontainers/selinux v1.9.1/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= +github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -113,6 +120,7 @@ github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5E github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -142,6 +150,7 @@ github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= @@ -218,6 +227,7 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.16.1 h1:TLyB3WofjdOEepBHAU20JdNC1Zbg87elYofWYAY5oZA= +golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/pkg/nvidia.com/resource/clientset/versioned/doc.go b/pkg/nvidia.com/resource/clientset/versioned/doc.go deleted file mode 100644 index 81e7b80d..00000000 --- a/pkg/nvidia.com/resource/clientset/versioned/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. - * - * 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. - */ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package versioned diff --git a/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_computeinstanceclaimparameters.go b/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_computeinstanceclaimparameters.go index aaa062e3..5198a000 100644 --- a/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_computeinstanceclaimparameters.go +++ b/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_computeinstanceclaimparameters.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/NVIDIA/k8s-dra-driver/api/nvidia.com/resource/gpu/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +35,9 @@ type FakeComputeInstanceClaimParameterses struct { ns string } -var computeinstanceclaimparametersesResource = schema.GroupVersionResource{Group: "gpu.resource.nvidia.com", Version: "v1alpha1", Resource: "computeinstanceclaimparameterses"} +var computeinstanceclaimparametersesResource = v1alpha1.SchemeGroupVersion.WithResource("computeinstanceclaimparameterses") -var computeinstanceclaimparametersesKind = schema.GroupVersionKind{Group: "gpu.resource.nvidia.com", Version: "v1alpha1", Kind: "ComputeInstanceClaimParameters"} +var computeinstanceclaimparametersesKind = v1alpha1.SchemeGroupVersion.WithKind("ComputeInstanceClaimParameters") // Get takes name of the computeInstanceClaimParameters, and returns the corresponding computeInstanceClaimParameters object, and an error if there is any. func (c *FakeComputeInstanceClaimParameterses) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ComputeInstanceClaimParameters, err error) { diff --git a/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_deviceclassparameters.go b/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_deviceclassparameters.go index 1479fe62..e94cadbd 100644 --- a/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_deviceclassparameters.go +++ b/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_deviceclassparameters.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/NVIDIA/k8s-dra-driver/api/nvidia.com/resource/gpu/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -35,9 +34,9 @@ type FakeDeviceClassParameters struct { Fake *FakeGpuV1alpha1 } -var deviceclassparametersResource = schema.GroupVersionResource{Group: "gpu.resource.nvidia.com", Version: "v1alpha1", Resource: "deviceclassparameters"} +var deviceclassparametersResource = v1alpha1.SchemeGroupVersion.WithResource("deviceclassparameters") -var deviceclassparametersKind = schema.GroupVersionKind{Group: "gpu.resource.nvidia.com", Version: "v1alpha1", Kind: "DeviceClassParameters"} +var deviceclassparametersKind = v1alpha1.SchemeGroupVersion.WithKind("DeviceClassParameters") // Get takes name of the deviceClassParameters, and returns the corresponding deviceClassParameters object, and an error if there is any. func (c *FakeDeviceClassParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.DeviceClassParameters, err error) { diff --git a/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_gpuclaimparameters.go b/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_gpuclaimparameters.go index 0040bc90..601ae720 100644 --- a/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_gpuclaimparameters.go +++ b/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_gpuclaimparameters.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/NVIDIA/k8s-dra-driver/api/nvidia.com/resource/gpu/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +35,9 @@ type FakeGpuClaimParameters struct { ns string } -var gpuclaimparametersResource = schema.GroupVersionResource{Group: "gpu.resource.nvidia.com", Version: "v1alpha1", Resource: "gpuclaimparameters"} +var gpuclaimparametersResource = v1alpha1.SchemeGroupVersion.WithResource("gpuclaimparameters") -var gpuclaimparametersKind = schema.GroupVersionKind{Group: "gpu.resource.nvidia.com", Version: "v1alpha1", Kind: "GpuClaimParameters"} +var gpuclaimparametersKind = v1alpha1.SchemeGroupVersion.WithKind("GpuClaimParameters") // Get takes name of the gpuClaimParameters, and returns the corresponding gpuClaimParameters object, and an error if there is any. func (c *FakeGpuClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GpuClaimParameters, err error) { diff --git a/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_migdeviceclaimparameters.go b/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_migdeviceclaimparameters.go index 57472075..41f0fd6c 100644 --- a/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_migdeviceclaimparameters.go +++ b/pkg/nvidia.com/resource/clientset/versioned/typed/gpu/v1alpha1/fake/fake_migdeviceclaimparameters.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/NVIDIA/k8s-dra-driver/api/nvidia.com/resource/gpu/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +35,9 @@ type FakeMigDeviceClaimParameters struct { ns string } -var migdeviceclaimparametersResource = schema.GroupVersionResource{Group: "gpu.resource.nvidia.com", Version: "v1alpha1", Resource: "migdeviceclaimparameters"} +var migdeviceclaimparametersResource = v1alpha1.SchemeGroupVersion.WithResource("migdeviceclaimparameters") -var migdeviceclaimparametersKind = schema.GroupVersionKind{Group: "gpu.resource.nvidia.com", Version: "v1alpha1", Kind: "MigDeviceClaimParameters"} +var migdeviceclaimparametersKind = v1alpha1.SchemeGroupVersion.WithKind("MigDeviceClaimParameters") // Get takes name of the migDeviceClaimParameters, and returns the corresponding migDeviceClaimParameters object, and an error if there is any. func (c *FakeMigDeviceClaimParameters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.MigDeviceClaimParameters, err error) { diff --git a/pkg/nvidia.com/resource/clientset/versioned/typed/nas/v1alpha1/fake/fake_nodeallocationstate.go b/pkg/nvidia.com/resource/clientset/versioned/typed/nas/v1alpha1/fake/fake_nodeallocationstate.go index b278a5fd..a8795967 100644 --- a/pkg/nvidia.com/resource/clientset/versioned/typed/nas/v1alpha1/fake/fake_nodeallocationstate.go +++ b/pkg/nvidia.com/resource/clientset/versioned/typed/nas/v1alpha1/fake/fake_nodeallocationstate.go @@ -24,7 +24,6 @@ import ( v1alpha1 "github.com/NVIDIA/k8s-dra-driver/api/nvidia.com/resource/gpu/nas/v1alpha1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" labels "k8s.io/apimachinery/pkg/labels" - schema "k8s.io/apimachinery/pkg/runtime/schema" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" testing "k8s.io/client-go/testing" @@ -36,9 +35,9 @@ type FakeNodeAllocationStates struct { ns string } -var nodeallocationstatesResource = schema.GroupVersionResource{Group: "nas.gpu.resource.nvidia.com", Version: "v1alpha1", Resource: "nodeallocationstates"} +var nodeallocationstatesResource = v1alpha1.SchemeGroupVersion.WithResource("nodeallocationstates") -var nodeallocationstatesKind = schema.GroupVersionKind{Group: "nas.gpu.resource.nvidia.com", Version: "v1alpha1", Kind: "NodeAllocationState"} +var nodeallocationstatesKind = v1alpha1.SchemeGroupVersion.WithKind("NodeAllocationState") // Get takes name of the nodeAllocationState, and returns the corresponding nodeAllocationState object, and an error if there is any. func (c *FakeNodeAllocationStates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.NodeAllocationState, err error) { diff --git a/versions.mk b/versions.mk index 4d79b765..4ec0cb16 100644 --- a/versions.mk +++ b/versions.mk @@ -21,12 +21,12 @@ VERSION ?= v0.1.0 # vVERSION represents the version with a guaranteed v-prefix vVERSION := v$(VERSION:v%=%) -GOLANG_VERSION ?= 1.20.4 +GOLANG_VERSION ?= 1.22.1 CUDA_VERSION ?= 11.8.0 -# these variables are only needed when building a local image -CLIENT_GEN_VERSION ?= v0.26.1 -CONTROLLER_GEN_VERSION ?= v0.9.2 +# These variables are only needed when building a local image +CLIENT_GEN_VERSION ?= v0.29.2 +CONTROLLER_GEN_VERSION ?= v0.14.0 GOLANGCI_LINT_VERSION ?= v1.52.0 MOQ_VERSION ?= v0.3.4