Skip to content

Commit

Permalink
Merge pull request #2047 from thomasferrandiz/bump-go-and-k8s
Browse files Browse the repository at this point in the history
Bump k8s API, other dependencies and upgrade go to 1.22
  • Loading branch information
thomasferrandiz authored Sep 5, 2024
2 parents da774f2 + 0dd8ba0 commit d58bf45
Show file tree
Hide file tree
Showing 10 changed files with 195 additions and 550 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: build flannel
on: [push, pull_request]

env:
GO_VERSION: "1.21"
GO_VERSION: "1.22"
LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le riscv64"
REPOSITORY: flannel/flannel

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
- cron: '30 20 * * 0'

env:
GO_VERSION: "1.21"
GO_VERSION: "1.22"

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2eTests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.21
go-version: ^1.22
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
cache: false
- name: golangci-lint
uses: golangci/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/k3s-e2eTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

env:
ARCH: amd64
GO_VERSION: "1.21"
GO_VERSION: "1.22"
KUBECONFIG: ${HOME}/.kube/config

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [published]

env:
GO_VERSION: "1.21"
GO_VERSION: "1.22"
LINUX_ARCHES: "amd64 arm arm64 s390x ppc64le riscv64"
REPOSITORY: flannel/flannel

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- cron: '34 5 * * 2'

env:
GO_VERSION: "1.21"
GO_VERSION: "1.22"
REPOSITORY: flannel/flannel

permissions:
Expand Down
21 changes: 12 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test e2e-test deps cover gofmt gofmt-fix license-check clean tar.gz release buildx-create-builder build-multi-arch
.PHONY: test unit-test e2e-test deps cover gofmt gofmt-fix license-check clean tar.gz release buildx-create-builder build-multi-arch

# Registry used for publishing images
REGISTRY?=quay.io/coreos/flannel
Expand All @@ -16,7 +16,7 @@ else
endif

# Go version to use for builds
GO_VERSION=1.21
GO_VERSION=1.22

# K8s version used for Makefile helpers
K8S_VERSION=1.24.6
Expand Down Expand Up @@ -71,6 +71,15 @@ endif

### TESTING
test: license-check gofmt deps verify-modules
make unit-test

# Test the docker-opts script
cd dist; ./mk-docker-opts_tests.sh

# Run the functional tests
make e2e-test

unit-test:
# Run the unit tests
# NET_ADMIN capacity is required to do some network operation
# SYS_ADMIN capacity is required to create network namespace
Expand All @@ -80,12 +89,6 @@ test: license-check gofmt deps verify-modules
golang:$(GO_VERSION) \
/bin/bash -c 'cd /go/src/github.com/flannel-io/flannel && go test -v -cover -timeout 5m $(TEST_PACKAGES_EXPANDED)'

# Test the docker-opts script
cd dist; ./mk-docker-opts_tests.sh

# Run the functional tests
make e2e-test

e2e-test: bash_unit dist/flanneld-e2e-$(TAG)-$(ARCH).docker
$(MAKE) -C images/iperf3 ARCH=$(ARCH)
FLANNEL_DOCKER_IMAGE=$(REGISTRY):$(TAG)-$(ARCH) ./bash_unit dist/functional-test.sh
Expand Down Expand Up @@ -214,8 +217,8 @@ install:
CGO_ENABLED=$(CGO_ENABLED) go install -v github.com/flannel-io/flannel

deps:
go mod vendor
go mod tidy
go mod vendor

buildx-create-builder:
docker buildx create --name mybuilder --use --bootstrap
Expand Down
110 changes: 54 additions & 56 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
module github.com/flannel-io/flannel

go 1.21
go 1.22

// replace github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.2.0

require (
github.com/Microsoft/hcsshim v0.12.3
github.com/bronze1man/goStrongswanVici v0.0.0-20221114103242-3f6dc524986c
github.com/Microsoft/hcsshim v0.12.6
github.com/bronze1man/goStrongswanVici v0.0.0-20231128135937-211cef3b0b20
github.com/containernetworking/plugins v1.5.1
github.com/coreos/go-iptables v0.7.0
github.com/coreos/go-iptables v0.8.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f
github.com/coreos/pkg v0.0.0-20240122114842-bbd7aa9bf6fb
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/joho/godotenv v1.5.1
github.com/jonboulle/clockwork v0.4.0
github.com/pkg/errors v0.9.1
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vishvananda/netns v0.0.4
go.uber.org/zap v1.17.0 // indirect
golang.org/x/net v0.27.0
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b // indirect
golang.org/x/net v0.28.0
golang.org/x/oauth2 v0.22.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect
k8s.io/api v0.27.13
k8s.io/apimachinery v0.27.13
k8s.io/client-go v0.27.13
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect
k8s.io/api v0.28.13
k8s.io/apimachinery v0.28.13
k8s.io/client-go v0.28.13
k8s.io/klog/v2 v2.130.1

)

require (
github.com/avast/retry-go/v4 v4.6.0
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.990
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.963
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.995
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.995
sigs.k8s.io/knftables v0.0.16
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/cgroups/v3 v3.0.3 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
Expand All @@ -61,41 +61,40 @@ require (
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/prometheus/client_golang v1.14.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.etcd.io/bbolt v1.3.9 // indirect
go.etcd.io/etcd/client/v2 v2.305.13 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.13 // indirect
go.etcd.io/etcd/raft/v3 v3.5.13 // indirect
go.etcd.io/etcd/server/v3 v3.5.13 // indirect
go.etcd.io/bbolt v1.3.10 // indirect
go.etcd.io/etcd/client/v2 v2.305.15 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.15 // indirect
go.etcd.io/etcd/raft/v3 v3.5.15 // indirect
go.etcd.io/etcd/server/v3 v3.5.15 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1 // indirect
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.28.0 // indirect
go.opentelemetry.io/otel/sdk v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
golang.org/x/sync v0.7.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect
golang.org/x/sync v0.8.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect
gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
)

require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.6.0 // indirect
Expand All @@ -111,23 +110,22 @@ require (
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.etcd.io/etcd/api/v3 v3.5.15
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/client/v3 v3.5.14
go.etcd.io/etcd/tests/v3 v3.5.13
go.etcd.io/etcd/client/pkg/v3 v3.5.15
go.etcd.io/etcd/client/v3 v3.5.15
go.etcd.io/etcd/tests/v3 v3.5.15
go.opencensus.io v0.24.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.25.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/term v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/grpc v1.62.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
google.golang.org/grpc v1.66.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
k8s.io/kube-openapi v0.0.0-20240903163716-9e1beecbcb38 // indirect
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit d58bf45

Please sign in to comment.