Skip to content

Commit

Permalink
Merge pull request #2342 from aojea/kindnetd116
Browse files Browse the repository at this point in the history
bump kindnetd deps and remove pkg/errors dep
  • Loading branch information
k8s-ci-robot authored Jun 29, 2021
2 parents 5dbdf31 + b28cf6d commit 875c8d0
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 51 deletions.
4 changes: 2 additions & 2 deletions images/kindnetd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# first stage build kindnetd binary
# NOTE: tentatively follow upstream kubernetes go version based on k8s in go.mod
FROM golang:1.15
FROM golang:1.16
WORKDIR /go/src
# make deps fetching cacheable
COPY go.mod go.sum ./
Expand All @@ -24,6 +24,6 @@ COPY . .
RUN CGO_ENABLED=0 go build -o ./kindnetd ./cmd/kindnetd

# build real kindnetd image
FROM k8s.gcr.io/build-image/debian-iptables:buster-v1.6.3
FROM k8s.gcr.io/build-image/debian-iptables:buster-v1.6.5
COPY --from=0 --chown=root:root ./go/src/kindnetd /bin/kindnetd
CMD ["/bin/kindnetd"]
6 changes: 3 additions & 3 deletions images/kindnetd/cmd/kindnetd/cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ limitations under the License.
package main

import (
"errors"
"fmt"
"io"
stdnet "net"
"os"
"reflect"
"text/template"

"github.com/pkg/errors"

corev1 "k8s.io/api/core/v1"
)

Expand Down Expand Up @@ -165,7 +165,7 @@ func (c *CNIConfigWriter) Write(inputs CNIConfigInputs) error {
func writeCNIConfig(w io.Writer, rawTemplate string, data CNIConfigInputs) error {
t, err := template.New("cni-json").Parse(rawTemplate)
if err != nil {
return errors.Wrap(err, "failed to parse cni template")
return fmt.Errorf("failed to parse cni template: %w", err)
}
return t.Execute(w, &data)
}
9 changes: 4 additions & 5 deletions images/kindnetd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ go 1.13

require (
github.com/coreos/go-iptables v0.4.5
github.com/pkg/errors v0.9.1
github.com/vishvananda/netlink v1.1.0
github.com/vishvananda/netns v0.0.0-20200520041808-52d707b772fe // indirect
k8s.io/api v0.20.5
k8s.io/apimachinery v0.20.5
k8s.io/client-go v0.20.5
k8s.io/klog/v2 v2.4.0
k8s.io/api v0.21.2
k8s.io/apimachinery v0.21.2
k8s.io/client-go v0.21.2
k8s.io/klog/v2 v2.9.0
)
Loading

0 comments on commit 875c8d0

Please sign in to comment.