Skip to content

Commit 1f3dd06

Browse files
author
Evan Lezar
committed
Merge branch 'cherry-pick-0.14.1' into 'release-0.14'
Cherry-pick changes for v0.14.1 release See merge request nvidia/kubernetes/device-plugin!305
2 parents 7209ee4 + 563f8c2 commit 1f3dd06

File tree

2,310 files changed

+316727
-58313
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,310 files changed

+316727
-58313
lines changed

.common-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
default:
1515
image: docker:stable
1616
services:
17-
- name: docker:stable-dind
17+
- name: docker:dind
1818
command: ["--experimental"]
1919

2020
variables:

api/config/v1/flags.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ func updateFromCLIFlag[T any](pflag **T, c *cli.Context, flagName string) {
4040
*flag = ptr(c.Bool(flagName))
4141
case **Duration:
4242
*flag = ptr(Duration(c.Duration(flagName)))
43+
case **deviceListStrategyFlag:
44+
*flag = ptr((deviceListStrategyFlag)(c.StringSlice(flagName)))
45+
default:
46+
panic(fmt.Errorf("unsupported flag type for %v: %T", flagName, flag))
4347
}
4448
}
4549
}

deployments/container/Dockerfile.ubi8

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,33 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG GOLANG_VERSION=1.20.1
15+
ARG GOLANG_VERSION=1.20.5
1616
ARG CUDA_IMAGE=cuda
17-
ARG CUDA_VERSION=11.6.1
17+
ARG CUDA_VERSION=12.2.0
1818
ARG BASE_DIST=ubi8
19-
FROM golang:${GOLANG_VERSION} as build
19+
FROM nvidia/cuda:${CUDA_VERSION}-base-${BASE_DIST} as build
20+
21+
RUN yum install -y \
22+
wget make git gcc \
23+
&& \
24+
rm -rf /var/cache/yum/*
25+
26+
ARG GOLANG_VERSION=x.x.x
27+
RUN set -eux; \
28+
\
29+
arch="$(uname -m)"; \
30+
case "${arch##*-}" in \
31+
x86_64 | amd64) ARCH='amd64' ;; \
32+
ppc64el | ppc64le) ARCH='ppc64le' ;; \
33+
aarch64) ARCH='arm64' ;; \
34+
*) echo "unsupported architecture" ; exit 1 ;; \
35+
esac; \
36+
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
37+
| tar -C /usr/local -xz
38+
39+
40+
ENV GOPATH /go
41+
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
2042

2143
WORKDIR /build
2244
COPY . .

deployments/container/Dockerfile.ubuntu

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,39 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG GOLANG_VERSION=1.20.1
15+
ARG GOLANG_VERSION=1.20.5
1616
ARG CUDA_IMAGE=cuda
17-
ARG CUDA_VERSION=11.6.1
17+
ARG CUDA_VERSION=12.2.0
1818
ARG BASE_DIST=ubuntu20.04
19-
FROM golang:${GOLANG_VERSION} as build
19+
FROM nvidia/cuda:${CUDA_VERSION}-base-${BASE_DIST} as build
20+
21+
RUN apt-get update && \
22+
apt-get install -y wget make git gcc \
23+
&& \
24+
rm -rf /var/lib/apt/lists/*
25+
26+
ARG GOLANG_VERSION=x.x.x
27+
RUN set -eux; \
28+
\
29+
arch="$(uname -m)"; \
30+
case "${arch##*-}" in \
31+
x86_64 | amd64) ARCH='amd64' ;; \
32+
ppc64el | ppc64le) ARCH='ppc64le' ;; \
33+
aarch64) ARCH='arm64' ;; \
34+
*) echo "unsupported architecture" ; exit 1 ;; \
35+
esac; \
36+
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
37+
| tar -C /usr/local -xz
38+
39+
ENV GOPATH /go
40+
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
2041

2142
WORKDIR /build
2243
COPY . .
2344

2445
RUN mkdir /artifacts
2546
ARG VERSION="N/A"
47+
ARG GIT_COMMIT="unknown"
2648
RUN make PREFIX=/artifacts cmds
2749

2850
FROM nvidia/${CUDA_IMAGE}:${CUDA_VERSION}-base-${BASE_DIST}

go.mod

Lines changed: 63 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,94 @@ module github.com/NVIDIA/k8s-device-plugin
33
go 1.20
44

55
replace (
6-
k8s.io/api => k8s.io/api v0.19.1
7-
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.19.1
8-
k8s.io/apimachinery => k8s.io/apimachinery v0.19.1
9-
k8s.io/apiserver => k8s.io/apiserver v0.19.1
10-
k8s.io/cli-runtime => k8s.io/cli-runtime v0.19.1
11-
k8s.io/client-go => k8s.io/client-go v0.19.1
12-
k8s.io/cloud-provider => k8s.io/cloud-provider v0.19.1
13-
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.19.1
14-
k8s.io/code-generator => k8s.io/code-generator v0.19.1
15-
k8s.io/component-base => k8s.io/component-base v0.19.1
16-
k8s.io/cri-api => k8s.io/cri-api v0.19.1
17-
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.19.1
18-
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.19.1
19-
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.19.1
20-
k8s.io/kube-proxy => k8s.io/kube-proxy v0.19.1
21-
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.19.1
22-
k8s.io/kubectl => k8s.io/kubectl v0.19.1
23-
k8s.io/kubelet => k8s.io/kubelet v0.19.1
24-
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.19.1
25-
k8s.io/metrics => k8s.io/metrics v0.19.1
26-
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.19.1
6+
k8s.io => k8s.io v0.27.3
7+
k8s.io/api => k8s.io/api v0.27.3
8+
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.27.3
9+
k8s.io/apimachinery => k8s.io/apimachinery v0.27.3
10+
k8s.io/apiserver => k8s.io/apiserver v0.27.3
11+
k8s.io/cli-runtime => k8s.io/cli-runtime v0.27.3
12+
k8s.io/client-go => k8s.io/client-go v0.27.3
13+
k8s.io/cloud-provider => k8s.io/cloud-provider v0.27.3
14+
k8s.io/cluster-bootstrap => k8s.io/cluster-bootstrap v0.27.3
15+
k8s.io/code-generator => k8s.io/code-generator v0.27.3
16+
k8s.io/component-base => k8s.io/component-base v0.27.3
17+
k8s.io/cri-api => k8s.io/cri-api v0.27.3
18+
k8s.io/csi-translation-lib => k8s.io/csi-translation-lib v0.27.3
19+
k8s.io/kube-aggregator => k8s.io/kube-aggregator v0.27.3
20+
k8s.io/kube-controller-manager => k8s.io/kube-controller-manager v0.27.3
21+
k8s.io/kube-proxy => k8s.io/kube-proxy v0.27.3
22+
k8s.io/kube-scheduler => k8s.io/kube-scheduler v0.27.3
23+
k8s.io/kubectl => k8s.io/kubectl v0.27.3
24+
k8s.io/kubelet => k8s.io/kubelet v0.27.3
25+
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.27.3
26+
k8s.io/metrics => k8s.io/metrics v0.27.3
27+
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.27.3
2728
)
2829

2930
require (
3031
github.com/NVIDIA/go-gpuallocator v0.2.3
31-
github.com/NVIDIA/nvidia-container-toolkit v1.13.0-rc.2.0.20230328200512-f6983969ad5d
32+
github.com/NVIDIA/nvidia-container-toolkit v1.13.3
3233
github.com/container-orchestrated-devices/container-device-interface v0.5.4-0.20230111111500-5b3b5d81179a
33-
github.com/fsnotify/fsnotify v1.5.4
34+
github.com/fsnotify/fsnotify v1.6.0
3435
github.com/google/uuid v1.3.0
35-
github.com/prometheus/procfs v0.1.3
36-
github.com/sirupsen/logrus v1.9.0
37-
github.com/stretchr/testify v1.7.0
36+
github.com/prometheus/procfs v0.8.0
37+
github.com/sirupsen/logrus v1.9.3
38+
github.com/stretchr/testify v1.8.2
3839
github.com/urfave/cli/v2 v2.4.0
3940
gitlab.com/nvidia/cloud-native/go-nvlib v0.0.0-20230327171225-18ad7cd513cf
40-
golang.org/x/net v0.7.0
41-
google.golang.org/grpc v1.29.0
42-
k8s.io/api v0.19.1
43-
k8s.io/apimachinery v0.19.1
44-
k8s.io/client-go v0.19.1
45-
k8s.io/klog/v2 v2.2.0
41+
golang.org/x/net v0.10.0
42+
google.golang.org/grpc v1.56.0
43+
k8s.io/api v0.27.3
44+
k8s.io/apimachinery v0.27.3
45+
k8s.io/client-go v0.27.3
46+
k8s.io/klog/v2 v2.90.1
4647
k8s.io/kubelet v0.0.0
4748
sigs.k8s.io/yaml v1.3.0
4849
)
4950

5051
require (
5152
github.com/NVIDIA/go-nvml v0.12.0-1 // indirect
5253
github.com/NVIDIA/gpu-monitoring-tools v0.0.0-20201222072828-352eb4c503a7 // indirect
53-
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
54+
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
5455
github.com/davecgh/go-spew v1.1.1 // indirect
55-
github.com/go-logr/logr v0.2.0 // indirect
56+
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
57+
github.com/go-logr/logr v1.2.3 // indirect
58+
github.com/go-openapi/jsonpointer v0.19.6 // indirect
59+
github.com/go-openapi/jsonreference v0.20.1 // indirect
60+
github.com/go-openapi/swag v0.22.3 // indirect
5661
github.com/gogo/protobuf v1.3.2 // indirect
57-
github.com/golang/protobuf v1.5.0 // indirect
58-
github.com/google/go-cmp v0.5.5 // indirect
62+
github.com/golang/protobuf v1.5.3 // indirect
63+
github.com/google/gnostic v0.5.7-v3refs // indirect
64+
github.com/google/go-cmp v0.5.9 // indirect
5965
github.com/google/gofuzz v1.1.0 // indirect
60-
github.com/googleapis/gnostic v0.4.1 // indirect
61-
github.com/hashicorp/golang-lru v0.5.1 // indirect
62-
github.com/imdario/mergo v0.3.5 // indirect
63-
github.com/json-iterator/go v1.1.10 // indirect
66+
github.com/imdario/mergo v0.3.6 // indirect
67+
github.com/josharian/intern v1.0.0 // indirect
68+
github.com/json-iterator/go v1.1.12 // indirect
69+
github.com/mailru/easyjson v0.7.7 // indirect
6470
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
65-
github.com/modern-go/reflect2 v1.0.1 // indirect
66-
github.com/opencontainers/runc v1.1.4 // indirect
67-
github.com/opencontainers/runtime-spec v1.0.3-0.20220825212826-86290f6a00fb // indirect
71+
github.com/modern-go/reflect2 v1.0.2 // indirect
72+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
73+
github.com/opencontainers/runc v1.1.7 // indirect
74+
github.com/opencontainers/runtime-spec v1.1.0-rc.2 // indirect
6875
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 // indirect
6976
github.com/pmezard/go-difflib v1.0.0 // indirect
7077
github.com/russross/blackfriday/v2 v2.1.0 // indirect
7178
github.com/spf13/pflag v1.0.5 // indirect
7279
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
73-
golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b // indirect
74-
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
75-
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6 // indirect
76-
golang.org/x/sys v0.5.0 // indirect
77-
golang.org/x/term v0.5.0 // indirect
78-
golang.org/x/text v0.7.0 // indirect
79-
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 // indirect
80-
google.golang.org/appengine v1.6.5 // indirect
81-
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
82-
google.golang.org/protobuf v1.27.1 // indirect
80+
golang.org/x/mod v0.9.0 // indirect
81+
golang.org/x/oauth2 v0.7.0 // indirect
82+
golang.org/x/sys v0.8.0 // indirect
83+
golang.org/x/term v0.8.0 // indirect
84+
golang.org/x/text v0.9.0 // indirect
85+
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
86+
google.golang.org/appengine v1.6.7 // indirect
87+
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
88+
google.golang.org/protobuf v1.30.0 // indirect
8389
gopkg.in/inf.v0 v0.9.1 // indirect
8490
gopkg.in/yaml.v2 v2.4.0 // indirect
8591
gopkg.in/yaml.v3 v3.0.1 // indirect
86-
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 // indirect
87-
sigs.k8s.io/structured-merge-diff/v4 v4.0.1 // indirect
92+
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
93+
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
94+
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
95+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
8896
)

0 commit comments

Comments
 (0)