Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-sriov-plugin
17 changes: 6 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
FROM golang:1.10.1 as build
FROM golang:1.22.2 as build
WORKDIR /go/src/docker-sriov-plugin

RUN go get github.com/docker/docker/client
RUN go get github.com/docker/docker/api/types

RUN go get github.com/golang/dep/cmd/dep
COPY Gopkg.toml Gopkg.lock ./
RUN dep ensure -v -vendor-only

COPY . .
RUN export CGO_LDFLAGS_ALLOW='-Wl,--unresolved-symbols=ignore-in-object-files' && \
go install -ldflags="-s -w" -v docker-sriov-plugin

FROM debian:stretch-slim
FROM debian:bookworm-slim
ARG PLUGIN_ARGS
COPY --from=build /go/bin/docker-sriov-plugin /bin/docker-sriov-plugin
COPY ibdev2netdev /tmp/tools/

CMD ["/bin/docker-sriov-plugin"]
RUN echo "$PLUGIN_ARGS" > /tmp/plugin_args
COPY run_docker_sriov_plugin /bin
CMD ["/bin/run_docker_sriov_plugin"]
132 changes: 0 additions & 132 deletions Gopkg.lock

This file was deleted.

29 changes: 0 additions & 29 deletions Gopkg.toml

This file was deleted.

10 changes: 6 additions & 4 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ function execute_cmd()
{
case "$input_cmd" in
"make")
echo "Building image: $ARCH_IMAGE"
docker build . --force-rm -t $ARCH_IMAGE
echo "Building image: $ARCH_IMAGE"
set -x
docker build . --force-rm -t $ARCH_IMAGE $@
;;
"push")
echo "Pushing images"
Expand Down Expand Up @@ -80,7 +81,8 @@ validate_input_cmd $1
if [ $# -lt 1 ]; then
input_cmd=make
else
input_cmd=$1
input_cmd=$1
shift
fi

execute_cmd
execute_cmd $@
2 changes: 1 addition & 1 deletion driver/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func getRightClientApiVersion() (string, error) {
// Start with the lowest API to query which version is supported.
lowestCli, err3 := client.NewClientWithOpts(client.FromEnv, client.WithVersion("1.12"))
lowestCli, err3 := client.NewClientWithOpts(client.FromEnv, client.WithVersion("1.24"))
if err3 != nil {
fmt.Println("Fail to create client: ", err3)
return "", err3
Expand Down
6 changes: 3 additions & 3 deletions driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package driver

import (
"fmt"
"github.com/Mellanox/sriovnet"
"github.com/k8snetworkplumbingwg/sriovnet"
"github.com/docker/go-plugins-helpers/network"
"github.com/docker/libnetwork/netlabel"
"github.com/docker/libnetwork/options"
"github.com/moby/moby/libnetwork/netlabel"
"github.com/moby/moby/libnetwork/options"
"log"
"net"
"os"
Expand Down
2 changes: 1 addition & 1 deletion driver/sriov.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package driver

import (
"fmt"
"github.com/Mellanox/sriovnet"
"github.com/k8snetworkplumbingwg/sriovnet"
"github.com/docker/go-plugins-helpers/network"
"log"
"strconv"
Expand Down
51 changes: 51 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module docker-sriov-plugin

go 1.22.2

replace google.golang.org/genproto/googleapis/api/httpbody => google.golang.org/genproto/googleapis/api/httpbody v0.0.0-20240227224415-6ceb2ff114de

replace google.golang.org/genproto/googleapis/rpc => google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de

replace google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de

require (
github.com/Mellanox/rdmamap v1.1.0
github.com/docker/docker v26.0.2+incompatible
github.com/docker/go-plugins-helpers v0.0.0-20211224144127-6eecb7beb651
github.com/k8snetworkplumbingwg/sriovnet v1.2.0
github.com/moby/moby v26.0.2+incompatible
github.com/urfave/cli v1.22.14
github.com/vishvananda/netlink v1.2.1-beta.2
)

require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/distribution/reference v0.6.0 // indirect
github.com/docker/go-connections v0.5.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.1.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.9.4 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
go.opentelemetry.io/otel v1.25.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.25.0 // indirect
go.opentelemetry.io/otel/metric v1.25.0 // indirect
go.opentelemetry.io/otel/sdk v1.25.0 // indirect
go.opentelemetry.io/otel/trace v1.25.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
)
Loading