Skip to content

Commit

Permalink
Support Kubernetes 1.29
Browse files Browse the repository at this point in the history
Signed-off-by: Tomoki Sugiura <[email protected]>
  • Loading branch information
chez-shanpu committed Jun 3, 2024
1 parent 48af49e commit 35b39bd
Show file tree
Hide file tree
Showing 13 changed files with 425 additions and 196 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.go-version }}
- name: Cache tools
id: cache-tools
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
v2/bin
Expand All @@ -39,7 +39,7 @@ jobs:
name: End-to-end Test
strategy:
matrix:
kindest-node: ["1.26.14", "1.27.11", "1.28.7"]
kindest-node: ["1.27.13", "1.28.9", "1.29.4"]
ip-version: ["ipv4", "ipv6"]
runs-on: ubuntu-22.04
steps:
Expand Down
2 changes: 1 addition & 1 deletion v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
IMAGE_TAG := latest
CONTROLLER_RUNTIME_VERSION := $(shell awk '/sigs\.k8s\.io\/controller-runtime/ {print substr($$2, 2)}' go.mod)
CONTROLLER_TOOLS_VERSION=0.15.0
PROTOC_VERSION=26.0
PROTOC_VERSION=27.0
PROTOC_GEN_GO_VERSION := $(shell awk '/google.golang.org\/protobuf/ {print substr($$2, 2)}' go.mod)
PROTOC_GEN_GO_GRPC_VERSON=1.3.0
PROTOC_GEN_DOC_VERSION=1.5.1
Expand Down
2 changes: 1 addition & 1 deletion v2/cmd/coil/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ func cmdCheck(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.PluginSupports("0.3.1", "0.4.0", "1.0.0"), fmt.Sprintf("coil %s", v2.Version()))
skel.PluginMainFuncs(skel.CNIFuncs{Add: cmdAdd, Del: cmdDel, Check: cmdCheck, GC: nil, Status: nil}, version.PluginSupports("0.3.1", "0.4.0", "1.0.0"), fmt.Sprintf("coil %s", v2.Version()))
}
5 changes: 4 additions & 1 deletion v2/cmd/coil/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/cybozu-go/coil/v2/pkg/cnirpc"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/resolver"
"google.golang.org/grpc/status"
)

Expand Down Expand Up @@ -36,7 +37,9 @@ func connect(sock string) (*grpc.ClientConn, error) {
dialFunc := func(ctx context.Context, a string) (net.Conn, error) {
return dialer.DialContext(ctx, "unix", a)
}
conn, err := grpc.Dial(sock, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(dialFunc))
resolver.SetDefaultScheme("passthrough")

conn, err := grpc.NewClient(sock, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(dialFunc))
if err != nil {
return nil, types.NewError(types.ErrTryAgainLater, "failed to connect to "+sock, err.Error())
}
Expand Down
350 changes: 314 additions & 36 deletions v2/config/crd/bases/coil.cybozu.com_egresses.yaml

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions v2/e2e/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
KIND_VERSION=0.22.0
KUBERNETES_VERSION=1.28.7
KUSTOMIZE_VERSION = 5.4.1
KIND_VERSION=0.23.0
KUBERNETES_VERSION=1.29.4
KUSTOMIZE_VERSION = 5.4.2
BINDIR := $(abspath $(PWD)/../bin)

KIND := $(BINDIR)/kind
Expand Down
58 changes: 29 additions & 29 deletions v2/go.mod
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
module github.com/cybozu-go/coil/v2

go 1.22.2
go 1.22.3

require (
github.com/bits-and-blooms/bitset v1.13.0
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.4.1
github.com/containernetworking/cni v1.2.0
github.com/containernetworking/plugins v1.5.0
github.com/coreos/go-iptables v0.7.0
github.com/cybozu-go/netutil v1.4.7
github.com/go-logr/logr v1.4.1
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/google/go-cmp v0.6.0
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.33.0
github.com/prometheus/client_golang v1.19.0
github.com/onsi/ginkgo/v2 v2.19.0
github.com/onsi/gomega v1.33.1
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.53.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.18.2
github.com/vishvananda/netlink v1.2.1-beta.2.0.20230807190133-6afddb37c1f0
go.uber.org/zap v1.27.0
golang.org/x/sync v0.6.0
golang.org/x/sys v0.19.0
google.golang.org/grpc v1.63.2
google.golang.org/protobuf v1.33.0
k8s.io/api v0.28.9
k8s.io/apimachinery v0.28.9
k8s.io/client-go v0.28.9
golang.org/x/sync v0.7.0
golang.org/x/sys v0.20.0
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.1
k8s.io/api v0.29.5
k8s.io/apimachinery v0.29.5
k8s.io/client-go v0.29.5
k8s.io/klog/v2 v2.120.1
k8s.io/utils v0.0.0-20240423183400-0849a56e8f22
sigs.k8s.io/controller-runtime v0.16.5
k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0
sigs.k8s.io/controller-runtime v0.17.5
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/evanphx/json-patch/v5 v5.8.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20230728192033-2ba5b33183c6 // indirect
github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
Expand All @@ -77,23 +77,23 @@ require (
github.com/vishvananda/netns v0.0.4 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.17.0 // indirect
golang.org/x/tools v0.21.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.28.3 // indirect
k8s.io/component-base v0.28.3 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/apiextensions-apiserver v0.29.2 // indirect
k8s.io/component-base v0.29.2 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // 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 35b39bd

Please sign in to comment.