Skip to content

Commit

Permalink
Merge pull request #246 from cybozu-go/support-k8s-1.26
Browse files Browse the repository at this point in the history
  • Loading branch information
ysksuzuki committed Apr 25, 2023
2 parents b37524a + 35cc542 commit 8b438a0
Show file tree
Hide file tree
Showing 21 changed files with 391 additions and 218 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Expand Up @@ -8,12 +8,12 @@ defaults:
run:
working-directory: v2
env:
go-version: 1.19
go-version: "1.20"
cache-version: 1
jobs:
test:
name: Small test
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand All @@ -39,9 +39,9 @@ jobs:
name: End-to-end Test
strategy:
matrix:
kindest-node: ["1.23.13", "1.24.7", "1.25.3"]
kindest-node: ["1.24.12", "1.25.8", "1.26.3"]
ip-version: ["ipv4", "ipv6"]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Expand Up @@ -7,12 +7,12 @@ defaults:
run:
working-directory: v2
env:
go-version: 1.19
go-version: 1.20
cache-version: 1
jobs:
image:
name: Push container image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
release:
name: Release on GitHub
needs: image
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Create release
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -23,7 +23,7 @@ Version 2 is generally available (GA). It conforms to [CNI spec 0.4.0](https://

## Dependencies

- Kubernetes Version: 1.23, 1.24, 1.25
- Kubernetes Version: 1.24, 1.25, 1.26
- Other versions are likely to work, but not tested.

- (Optional) Routing software
Expand Down
4 changes: 2 additions & 2 deletions v2/Dockerfile
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM quay.io/cybozu/golang:1.19-focal as build-env
FROM --platform=$BUILDPLATFORM quay.io/cybozu/golang:1.20-jammy as build-env

ARG TARGETARCH

Expand All @@ -7,7 +7,7 @@ WORKDIR /workdir

RUN make build GOARCH=${TARGETARCH}

FROM --platform=$TARGETPLATFORM quay.io/cybozu/ubuntu:20.04
FROM --platform=$TARGETPLATFORM quay.io/cybozu/ubuntu:22.04

# https://docs.github.com/en/packages/managing-container-images-with-github-container-registry/connecting-a-repository-to-a-container-image#connecting-a-repository-to-a-container-image-on-the-command-line
LABEL org.opencontainers.image.source https://github.com/cybozu-go/coil
Expand Down
6 changes: 3 additions & 3 deletions v2/Makefile
Expand Up @@ -2,10 +2,10 @@

IMAGE_TAG := latest
CONTROLLER_RUNTIME_VERSION := $(shell awk '/sigs\.k8s\.io\/controller-runtime/ {print substr($$2, 2)}' go.mod)
CONTROLLER_TOOLS_VERSION=0.10.0
PROTOC_VERSION=21.6
CONTROLLER_TOOLS_VERSION=0.11.4
PROTOC_VERSION=22.3
PROTOC_GEN_GO_VERSION := $(shell awk '/google.golang.org\/protobuf/ {print substr($$2, 2)}' go.mod)
PROTOC_GEN_GO_GRPC_VERSON=1.2.0
PROTOC_GEN_GO_GRPC_VERSON=1.3.0
PROTOC_GEN_DOC_VERSION=1.5.1

## DON'T EDIT BELOW THIS LINE
Expand Down
3 changes: 1 addition & 2 deletions v2/config/crd/bases/coil.cybozu.com_addressblocks.yaml
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.11.4
name: addressblocks.coil.cybozu.com
spec:
group: coil.cybozu.com
Expand Down
3 changes: 1 addition & 2 deletions v2/config/crd/bases/coil.cybozu.com_addresspools.yaml
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.11.4
name: addresspools.coil.cybozu.com
spec:
group: coil.cybozu.com
Expand Down
3 changes: 1 addition & 2 deletions v2/config/crd/bases/coil.cybozu.com_blockrequests.yaml
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.11.4
name: blockrequests.coil.cybozu.com
spec:
group: coil.cybozu.com
Expand Down
254 changes: 227 additions & 27 deletions v2/config/crd/bases/coil.cybozu.com_egresses.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion v2/config/rbac/coil-controller_role.yaml
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: coil-controller
rules:
- apiGroups:
Expand Down
1 change: 0 additions & 1 deletion v2/config/rbac/coil-egress_role.yaml
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: coil-egress
rules:
- apiGroups:
Expand Down
1 change: 0 additions & 1 deletion v2/config/rbac/coil-router_role.yaml
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: coil-router
rules:
- apiGroups:
Expand Down
1 change: 0 additions & 1 deletion v2/config/rbac/coild_role.yaml
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: coild
rules:
- apiGroups:
Expand Down
2 changes: 0 additions & 2 deletions v2/config/webhook/manifests.v1.yaml
Expand Up @@ -2,7 +2,6 @@
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
creationTimestamp: null
name: mutating-webhook-configuration
webhooks:
- admissionReviewVersions:
Expand Down Expand Up @@ -49,7 +48,6 @@ webhooks:
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: validating-webhook-configuration
webhooks:
- admissionReviewVersions:
Expand Down
6 changes: 3 additions & 3 deletions v2/e2e/Makefile
@@ -1,6 +1,6 @@
KIND_VERSION=0.17.0
KUBERNETES_VERSION=1.25.3
KUSTOMIZE_VERSION = 4.5.5
KIND_VERSION=0.18.0
KUBERNETES_VERSION=1.26.3
KUSTOMIZE_VERSION = 5.0.1
BINDIR := $(abspath $(PWD)/../bin)

KIND := $(BINDIR)/kind
Expand Down
2 changes: 1 addition & 1 deletion v2/e2e/manifests/nat-client.yaml
Expand Up @@ -13,5 +13,5 @@ spec:
test: coil
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu:20.04
image: quay.io/cybozu/ubuntu:22.04
command: ["pause"]
2 changes: 1 addition & 1 deletion v2/e2e/manifests/ubuntu.yaml
Expand Up @@ -22,5 +22,5 @@ spec:
topologyKey: kubernetes.io/hostname
containers:
- name: ubuntu
image: quay.io/cybozu/ubuntu-debug:20.04
image: quay.io/cybozu/ubuntu-debug:22.04
command: ["/usr/local/bin/pause"]
80 changes: 41 additions & 39 deletions v2/go.mod
@@ -1,36 +1,36 @@
module github.com/cybozu-go/coil/v2

go 1.19
go 1.20

require (
github.com/bits-and-blooms/bitset v1.3.3
github.com/bits-and-blooms/bitset v1.7.0
github.com/containernetworking/cni v1.1.2
github.com/containernetworking/plugins v1.1.1
github.com/containernetworking/plugins v1.2.0
github.com/coreos/go-iptables v0.6.0
github.com/cybozu-go/netutil v1.4.3
github.com/go-logr/logr v1.2.3
github.com/cybozu-go/netutil v1.4.4
github.com/go-logr/logr v1.2.4
github.com/go-logr/zapr v1.2.3
github.com/google/go-cmp v0.5.9
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/onsi/ginkgo/v2 v2.4.0
github.com/onsi/gomega v1.23.0
github.com/prometheus/client_golang v1.14.0
github.com/onsi/ginkgo/v2 v2.9.2
github.com/onsi/gomega v1.27.6
github.com/prometheus/client_golang v1.15.0
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.39.0
github.com/spf13/cobra v1.6.0
github.com/spf13/viper v1.13.0
github.com/prometheus/common v0.42.0
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.15.0
github.com/vishvananda/netlink v1.2.1-beta.2
go.uber.org/zap v1.23.0
golang.org/x/sys v0.5.0
google.golang.org/grpc v1.49.0
google.golang.org/protobuf v1.28.1
k8s.io/api v0.25.6
k8s.io/apimachinery v0.25.6
k8s.io/client-go v0.25.6
go.uber.org/zap v1.24.0
golang.org/x/sys v0.7.0
google.golang.org/grpc v1.54.0
google.golang.org/protobuf v1.30.0
k8s.io/api v0.26.4
k8s.io/apimachinery v0.26.4
k8s.io/client-go v0.26.4
k8s.io/klog/v2 v2.80.1
k8s.io/utils v0.0.0-20230115233650-391b47cb4029
sigs.k8s.io/controller-runtime v0.13.1
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
sigs.k8s.io/controller-runtime v0.14.6
)

require (
Expand All @@ -43,51 +43,53 @@ require (
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/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic v0.6.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 // indirect
github.com/spf13/afero v1.8.2 // indirect
github.com/safchain/ethtool v0.2.0 // indirect
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.1 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/vishvananda/netns v0.0.3 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.8.0 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.7.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // 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.25.6 // indirect
k8s.io/component-base v0.25.6 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect
k8s.io/component-base v0.26.1 // indirect
k8s.io/kube-openapi v0.0.0-20230118215034-64b6bb138190 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
Expand Down

0 comments on commit 8b438a0

Please sign in to comment.