Skip to content

Commit

Permalink
Support k8s 1.30 and dependencies (#301)
Browse files Browse the repository at this point in the history
* Support k8s 1.30

Signed-off-by: Daichi Sakaue <[email protected]>

* Update k8s related libraries

Signed-off-by: terashima <[email protected]>

* Update dependencies

Signed-off-by: terashima <[email protected]>

---------

Signed-off-by: Daichi Sakaue <[email protected]>
Signed-off-by: terashima <[email protected]>
Co-authored-by: terashima <[email protected]>
  • Loading branch information
yokaze and terassyi authored Jan 7, 2025
1 parent 2b005e0 commit 568d06b
Show file tree
Hide file tree
Showing 15 changed files with 225 additions and 260 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ defaults:
run:
working-directory: v2
env:
go-version: "1.22"
go-version: "1.23"
cache-version: 1
jobs:
test:
name: Small test
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand All @@ -39,9 +39,9 @@ jobs:
name: End-to-end Test
strategy:
matrix:
kindest-node: ["1.27.13", "1.28.9", "1.29.4"]
kindest-node: ["1.28.15", "1.29.12", "1.30.8"]
ip-version: ["ipv4", "ipv6"]
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ defaults:
run:
working-directory: v2
env:
go-version: "1.22"
go-version: "1.23"
cache-version: 1
jobs:
image:
name: Push container image
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
id: set-tag
run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT # Remove "v" prefix.
- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./v2
platforms: linux/amd64,linux/arm64/v8
Expand All @@ -53,7 +53,7 @@ jobs:
release:
name: Release on GitHub
needs: image
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Create release
Expand Down
4 changes: 2 additions & 2 deletions v2/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM ghcr.io/cybozu/golang:1.22-jammy as build-env
FROM --platform=$BUILDPLATFORM ghcr.io/cybozu/golang:1.23-noble as build-env

ARG TARGETARCH

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

RUN make build GOARCH=${TARGETARCH}

FROM --platform=$TARGETPLATFORM ghcr.io/cybozu/ubuntu:22.04
FROM --platform=$TARGETPLATFORM ghcr.io/cybozu/ubuntu:24.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
8 changes: 4 additions & 4 deletions v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

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=27.2
CONTROLLER_TOOLS_VERSION=0.16.4
PROTOC_VERSION=29.2
PROTOC_GEN_GO_VERSION := $(shell awk '/google.golang.org\/protobuf/ {print substr($$2, 2)}' go.mod)
PROTOC_GEN_GO_GRPC_VERSON=1.4.0
PROTOC_GEN_GO_GRPC_VERSON=1.5.1
PROTOC_GEN_DOC_VERSION=1.5.1
YQ_VERSION=4.44.1
YQ_VERSION=4.44.6

## DON'T EDIT BELOW THIS LINE
SUDO=sudo
Expand Down
3 changes: 1 addition & 2 deletions v2/config/crd/bases/coil.cybozu.com_addressblocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.4
name: addressblocks.coil.cybozu.com
spec:
group: coil.cybozu.com
Expand Down Expand Up @@ -33,7 +33,6 @@ spec:
description: |-
AddressBlock is the Schema for the addressblocks API
The ownerReferences field contains the AddressPool where the block is carved from.
properties:
apiVersion:
Expand Down
3 changes: 1 addition & 2 deletions v2/config/crd/bases/coil.cybozu.com_addresspools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.4
name: addresspools.coil.cybozu.com
spec:
group: coil.cybozu.com
Expand Down Expand Up @@ -58,7 +58,6 @@ spec:
For example, if the first item is an IPv4 subnet, the other items must also be
an IPv4 subnet.
This field can be updated only by adding subnets to the list.
items:
description: |-
Expand Down
3 changes: 1 addition & 2 deletions v2/config/crd/bases/coil.cybozu.com_blockrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.4
name: blockrequests.coil.cybozu.com
spec:
group: coil.cybozu.com
Expand All @@ -20,7 +20,6 @@ spec:
description: |-
BlockRequest is the Schema for the blockrequests API
The ownerReferences field contains the Node on which coild that created this run.
properties:
apiVersion:
Expand Down
14 changes: 10 additions & 4 deletions v2/config/crd/bases/coil.cybozu.com_egresses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.15.0
controller-gen.kubebuilder.io/version: v0.16.4
name: egresses.coil.cybozu.com
spec:
group: coil.cybozu.com
Expand Down Expand Up @@ -112,9 +112,6 @@ spec:
description: |-
Rolling update config params. Present only if DeploymentStrategyType =
RollingUpdate.
---
TODO: Update this to follow our convention for oneOf, whatever we decide it
to be.
properties:
maxSurge:
anyOf:
Expand Down Expand Up @@ -867,6 +864,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down Expand Up @@ -973,6 +971,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down Expand Up @@ -1171,6 +1170,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down Expand Up @@ -1572,6 +1572,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down Expand Up @@ -1678,6 +1679,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down Expand Up @@ -1876,6 +1878,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down Expand Up @@ -2291,6 +2294,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down Expand Up @@ -2397,6 +2401,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down Expand Up @@ -2595,6 +2600,7 @@ spec:
format: int32
type: integer
service:
default: ""
type: string
required:
- port
Expand Down
16 changes: 1 addition & 15 deletions v2/config/rbac/coil-controller_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,6 @@ rules:
- coil.cybozu.com
resources:
- blockrequests
verbs:
- get
- list
- watch
- apiGroups:
- coil.cybozu.com
resources:
- blockrequests/status
verbs:
- get
- patch
- update
- apiGroups:
- coil.cybozu.com
resources:
- egresses
verbs:
- get
Expand All @@ -91,6 +76,7 @@ rules:
- apiGroups:
- coil.cybozu.com
resources:
- blockrequests/status
- egresses/status
verbs:
- get
Expand Down
9 changes: 1 addition & 8 deletions v2/config/rbac/coild_role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rules:
- ""
resources:
- namespaces
- pods
- services
verbs:
- get
Expand All @@ -19,14 +20,6 @@ rules:
- nodes
verbs:
- get
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- coil.cybozu.com
resources:
Expand Down
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.23.0
KUBERNETES_VERSION=1.29.4
KUSTOMIZE_VERSION = 5.4.2
KIND_VERSION=0.26.0
KUBERNETES_VERSION=1.30.8
KUSTOMIZE_VERSION = 5.5.0
BINDIR := $(abspath $(PWD)/../bin)

KIND := $(BINDIR)/kind
Expand Down
Loading

0 comments on commit 568d06b

Please sign in to comment.