Skip to content

Commit

Permalink
Merge pull request #59 from cybozu-go/k8s-1.30
Browse files Browse the repository at this point in the history
Bump supported kubernetes from 1.29 to 1.30
  • Loading branch information
takahiro-yamada authored Oct 3, 2024
2 parents 350f259 + 9e25d40 commit db9099b
Show file tree
Hide file tree
Showing 16 changed files with 237 additions and 685 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ jobs:
name: End-to-End Tests
strategy:
matrix:
k8s-version: ["1.27.13", "1.28.9", "1.29.4"]
k8s-version: ["1.28.13", "1.29.8", "1.30.4"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: aquaproj/aqua-installer@4551ec64e21bf0f557c2525135ff0bd2cba40ec7 # v3.0.0
- uses: aquaproj/aqua-installer@6ce1f8848ec8e61f14d57bd5d7597057a6dd187c # v3.0.1
with:
aqua_version: v2.27.3
aqua_version: v2.34.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: make setup E2ETEST_K8S_VERSION=${{ matrix.k8s-version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-buildx-action@v3
- run: make docker-build
- name: Login to ghcr.io
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM ghcr.io/cybozu/golang:1.22-jammy as builder
FROM ghcr.io/cybozu/golang:1.23-jammy as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -20,7 +20,7 @@ COPY pkg/ pkg/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager cmd/nyamber-controller/main.go

FROM ghcr.io/cybozu/ubuntu:22.04
LABEL org.opencontainers.image.source https://github.com/cybozu-go/nyamber
LABEL org.opencontainers.image.source=https://github.com/cybozu-go/nyamber

WORKDIR /
COPY --from=builder /workspace/manager .
Expand Down
52 changes: 26 additions & 26 deletions Dockerfile.runner
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM ghcr.io/cybozu/golang:1.22-jammy as builder
FROM ghcr.io/cybozu/golang:1.23-jammy as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -19,10 +19,10 @@ RUN --mount=type=cache,target=/go/pkg/mod \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o entrypoint cmd/entrypoint/main.go

FROM ghcr.io/cybozu/ubuntu:22.04
LABEL org.opencontainers.image.source https://github.com/cybozu-go/nyamber
LABEL org.opencontainers.image.source=https://github.com/cybozu-go/nyamber

ENV GO_VERSION=1.22.3
ENV PLACEMAT_VERSION=2.4.5
ENV GO_VERSION=1.23.1
ENV PLACEMAT_VERSION=2.4.6

ENV HOME=/home/nyamber
ENV GOPATH=${HOME}/go
Expand All @@ -37,36 +37,36 @@ COPY include-bird /etc/dpkg/dpkg.cfg.d/

RUN apt-get update \
&& apt-get -y install --no-install-recommends \
git \
bash-completion \
bird2 \
build-essential \
cloud-utils \
dbus \
dnsmasq \
fakeroot \
freeipmi-tools \
git \
iproute2 \
iptables \
jq \
kmod \
less \
wget \
systemd-container \
libgpgme11 \
lldpd \
lsb-release \
qemu \
qemu-kvm \
socat \
openssh-client \
picocom \
swtpm \
cloud-utils \
bird2 \
socat \
squid \
dnsmasq \
xauth \
bash-completion \
dbus \
jq \
libgpgme11 \
freeipmi-tools \
unzip \
fakeroot \
time \
kmod \
iptables \
iproute2 \
openssh-client \
sudo \
lsb-release \
swtpm \
systemd-container \
time \
unzip \
wget \
xauth \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSLf https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -C /usr/local -xzf - \
&& curl -sfL https://github.com/cybozu-go/placemat/releases/download/v${PLACEMAT_VERSION}/placemat2_${PLACEMAT_VERSION}_amd64.deb -o placemat2_${PLACEMAT_VERSION}_amd64.deb \
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ STATICCHECK = $(LOCALBIN)/staticcheck
CRD_TO_MARKDOWN ?= $(LOCALBIN)/crd-to-markdown

## Tool Versions
CONTROLLER_TOOLS_VERSION ?= v0.15.0
CONTROLLER_TOOLS_VERSION ?= v0.16.3

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
# the kubebuilder version of the ready-to-use can get by "./bin/setup-envtest list" command.
ENVTEST_K8S_VERSION = 1.29.5
ENVTEST_K8S_VERSION = 1.30.3

# KUSTOMIZE_VERSION can be found at https://github.com/kubernetes-sigs/kustomize/releases
KUSTOMIZE_VERSION ?= v5.4.2
KUSTOMIZE_VERSION ?= v5.4.3

# Setting SHELL to bash allows bash commands to be executed by recipes.
# This is a requirement for 'setup-envtest.sh' in the test target.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Nyamber is a custom controller to create Neco environment
- Create dctest pods on the specified schedule

## Supported Software
- Kubernetes: 1.27, 1.28, 1.29
- Kubernetes: 1.28, 1.29, 1.30

## Documentation

Expand Down
16 changes: 8 additions & 8 deletions aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
# https://aquaproj.github.io/
registries:
- type: standard
ref: v4.195.0 # renovate: depName=aquaproj/aqua-registry
ref: v4.226.0 # renovate: depName=aquaproj/aqua-registry
- type: local
name: local
path: registry.yaml
packages:
- name: kubernetes/kubectl@v1.29.6
- name: kubernetes-sigs/kubebuilder@v4.0.0
- name: kubernetes-sigs/kustomize@kustomize/v5.4.2
- name: kubernetes-sigs/kind@v0.23.0
- name: tilt-dev/[email protected].17
- name: tilt-dev/[email protected].29
- name: mikefarah/[email protected].2
- name: kubernetes/kubectl@v1.30.5
- name: kubernetes-sigs/kubebuilder@v4.2.0
- name: kubernetes-sigs/kustomize@kustomize/v5.4.3
- name: kubernetes-sigs/kind@v0.24.0
- name: tilt-dev/[email protected].20
- name: tilt-dev/[email protected].34
- name: mikefarah/[email protected].3
- name: clamoriniere/[email protected]
registry: local
2 changes: 1 addition & 1 deletion cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ apiVersion: ctlptl.dev/v1alpha1
kind: Cluster
name: kind-nyamber-dev
product: kind
kubernetesVersion: v1.29.4
kubernetesVersion: v1.30.4
registry: nyamber-registry
31 changes: 10 additions & 21 deletions config/crd/bases/nyamber.cybozu.io_autovirtualdcs.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.3
name: autovirtualdcs.nyamber.cybozu.io
spec:
group: nyamber.cybozu.io
Expand Down Expand Up @@ -97,11 +97,9 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.
This is an alpha field and requires enabling the
DynamicResourceAllocation feature gate.
This field is immutable. It can only be set for containers.
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
Expand All @@ -112,6 +110,12 @@ spec:
the Pod where this field is used. It makes that resource available
inside a container.
type: string
request:
description: |-
Request is the name chosen for a request in the referenced claim.
If empty, everything from the claim is made available, otherwise
only the result of this request.
type: string
required:
- name
type: object
Expand Down Expand Up @@ -154,18 +158,8 @@ spec:
conditions:
description: Conditions is an array of conditions.
items:
description: "Condition contains details for one aspect
of the current state of this API Resource.\n---\nThis
struct is intended for direct use as an array at the field
path .status.conditions. For example,\n\n\n\ttype FooStatus
struct{\n\t // Represents the observations of a foo's
current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t
\ // +patchMergeKey=type\n\t // +patchStrategy=merge\n\t
\ // +listType=map\n\t // +listMapKey=type\n\t Conditions
[]metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\"
patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of
the current state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -207,12 +201,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
29 changes: 10 additions & 19 deletions config/crd/bases/nyamber.cybozu.io_virtualdcs.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.3
name: virtualdcs.nyamber.cybozu.io
spec:
group: nyamber.cybozu.io
Expand Down Expand Up @@ -75,11 +75,9 @@ spec:
Claims lists the names of resources, defined in spec.resourceClaims,
that are used by this container.
This is an alpha field and requires enabling the
DynamicResourceAllocation feature gate.
This field is immutable. It can only be set for containers.
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
Expand All @@ -90,6 +88,12 @@ spec:
the Pod where this field is used. It makes that resource available
inside a container.
type: string
request:
description: |-
Request is the name chosen for a request in the referenced claim.
If empty, everything from the claim is made available, otherwise
only the result of this request.
type: string
required:
- name
type: object
Expand Down Expand Up @@ -132,16 +136,8 @@ spec:
conditions:
description: Conditions is an array of conditions.
items:
description: "Condition contains details for one aspect of the current
state of this API Resource.\n---\nThis struct is intended for
direct use as an array at the field path .status.conditions. For
example,\n\n\n\ttype FooStatus struct{\n\t // Represents the
observations of a foo's current state.\n\t // Known .status.conditions.type
are: \"Available\", \"Progressing\", and \"Degraded\"\n\t //
+patchMergeKey=type\n\t // +patchStrategy=merge\n\t // +listType=map\n\t
\ // +listMapKey=type\n\t Conditions []metav1.Condition `json:\"conditions,omitempty\"
patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t
\ // other fields\n\t}"
description: Condition contains details for one aspect of the current
state of this API Resource.
properties:
lastTransitionTime:
description: |-
Expand Down Expand Up @@ -182,12 +178,7 @@ spec:
- Unknown
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
---
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be
useful (see .node.status.conditions), the ability to deconflict is important.
The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)
description: type of condition in CamelCase or in foo.example.com/CamelCase.
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
Expand Down
44 changes: 2 additions & 42 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,7 @@ rules:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- create
Expand All @@ -44,6 +22,7 @@ rules:
- nyamber.cybozu.io
resources:
- autovirtualdcs
- virtualdcs
verbs:
- create
- delete
Expand All @@ -56,33 +35,14 @@ rules:
- nyamber.cybozu.io
resources:
- autovirtualdcs/status
- virtualdcs/status
verbs:
- get
- patch
- update
- apiGroups:
- nyamber.cybozu.io
resources:
- virtualdcs
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- nyamber.cybozu.io
resources:
- virtualdcs/finalizers
verbs:
- update
- apiGroups:
- nyamber.cybozu.io
resources:
- virtualdcs/status
verbs:
- get
- patch
- update
Loading

0 comments on commit db9099b

Please sign in to comment.