Skip to content

Commit

Permalink
Merge pull request #47 from cybozu-go/k8s-1.26
Browse files Browse the repository at this point in the history
Update supported Kubernetes to v1.26
  • Loading branch information
masa213f authored May 12, 2023
2 parents 2574a2a + 1ffbc5c commit 52678d0
Show file tree
Hide file tree
Showing 15 changed files with 181 additions and 171 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- run: make setup
Expand All @@ -29,11 +29,11 @@ jobs:
name: End-to-End Tests
strategy:
matrix:
k8s-version: ["1.23.13", "1.24.7", "1.25.3"]
k8s-version: ["1.24.12", "1.25.8", "1.26.3"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- uses: aquaproj/aqua-installer@61e2563dfe7674cbf74fe6ec212e444198a3bb00 #v2.0.2
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@v3
- uses: docker/setup-buildx-action@v1
- uses: docker/setup-buildx-action@v2
- run: make docker-build
- name: Login to ghcr.io
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM quay.io/cybozu/golang:1.19-jammy as builder
FROM quay.io/cybozu/golang:1.20-jammy as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.runner
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM quay.io/cybozu/golang:1.19-jammy as builder
FROM quay.io/cybozu/golang:1.20-jammy as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -21,8 +21,8 @@ RUN --mount=type=cache,target=/go/pkg/mod \
FROM quay.io/cybozu/ubuntu:22.04
LABEL org.opencontainers.image.source https://github.com/cybozu-go/nyamber

ENV GO_VERSION=1.19.5
ENV PLACEMAT_VERSION=2.4.0
ENV GO_VERSION=1.20.4
ENV PLACEMAT_VERSION=2.4.2

ENV HOME=/home/nyamber
ENV GOPATH=${HOME}/go
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ STATICCHECK = $(LOCALBIN)/staticcheck
CRD_TO_MARKDOWN ?= $(LOCALBIN)/crd-to-markdown

## Tool Versions
CONTROLLER_TOOLS_VERSION ?= v0.11.2
CONTROLLER_TOOLS_VERSION ?= v0.12.0
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.25.0
KUSTOMIZE_VERSION ?= v4.5.7
ENVTEST_K8S_VERSION = 1.26.1
KUSTOMIZE_VERSION ?= v5.0.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.23, 1.24, 1.25
- Kubernetes: 1.24, 1.25, 1.26

## Documentation

Expand Down
14 changes: 7 additions & 7 deletions aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ registries:
name: local
path: registry.yaml
packages:
- name: kubernetes/kubectl@v1.25.6
- name: kubernetes-sigs/kubebuilder@v3.9.0
- name: kubernetes-sigs/kustomize@kustomize/v4.5.7
- name: kubernetes-sigs/kind@v0.17.0
- name: tilt-dev/tilt@v0.31.1
- name: tilt-dev/ctlptl@v0.8.16
- name: mikefarah/yq@v4.30.8
- name: kubernetes/kubectl@v1.26.4
- name: kubernetes-sigs/kubebuilder@v3.10.0
- name: kubernetes-sigs/kustomize@kustomize/v5.0.3
- name: kubernetes-sigs/kind@v0.18.0
- name: tilt-dev/tilt@v0.32.3
- name: tilt-dev/ctlptl@v0.8.18
- name: mikefarah/yq@v4.33.3
- name: clamoriniere/crd-to-markdown@v0.0.3
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.25.3
kubernetesVersion: v1.26.3
registry: nyamber-registry
25 changes: 23 additions & 2 deletions config/crd/bases/nyamber.cybozu.io_autovirtualdcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: autovirtualdcs.nyamber.cybozu.io
spec:
group: nyamber.cybozu.io
Expand Down Expand Up @@ -84,6 +83,28 @@ spec:
description: ResourceRequirements describes the compute resource
requirements.
properties:
claims:
description: "Claims lists the names of resources, defined
in spec.resourceClaims, that are used by this container.
\n This is an alpha field and requires enabling the
DynamicResourceAllocation feature gate. \n This field
is immutable. It can only be set for containers."
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: Name must match the name of one entry
in pod.spec.resourceClaims of the Pod where this
field is used. It makes that resource available
inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
Expand Down
24 changes: 22 additions & 2 deletions config/crd/bases/nyamber.cybozu.io_virtualdcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.2
creationTimestamp: null
controller-gen.kubebuilder.io/version: v0.12.0
name: virtualdcs.nyamber.cybozu.io
spec:
group: nyamber.cybozu.io
Expand Down Expand Up @@ -63,6 +62,27 @@ spec:
resources:
description: ResourceRequirements describes the compute resource requirements.
properties:
claims:
description: "Claims lists the names of resources, defined in
spec.resourceClaims, that are used by this container. \n This
is an alpha field and requires enabling the DynamicResourceAllocation
feature gate. \n This field is immutable. It can only be set
for containers."
items:
description: ResourceClaim references one entry in PodSpec.ResourceClaims.
properties:
name:
description: Name must match the name of one entry in pod.spec.resourceClaims
of the Pod where this field is used. It makes that resource
available inside a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
Expand Down
1 change: 0 additions & 1 deletion config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
name: manager-role
rules:
- apiGroups:
Expand Down
1 change: 0 additions & 1 deletion config/webhook/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
creationTimestamp: null
name: validating-webhook-configuration
webhooks:
- admissionReviewVersions:
Expand Down
4 changes: 2 additions & 2 deletions e2e/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# NOTE: kind version is specified at aqua.yaml
E2ETEST_K8S_VERSION := 1.25.3
CERT_MANAGER_VERSION := 1.11.0
E2ETEST_K8S_VERSION := 1.26.3
CERT_MANAGER_VERSION := 1.11.2

PROJECT_DIR := $(CURDIR)/../
BIN_DIR := $(PROJECT_DIR)/bin
Expand Down
102 changes: 45 additions & 57 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,103 +1,91 @@
module github.com/cybozu-go/nyamber

go 1.19
go 1.20

require (
github.com/cybozu-go/well v1.11.2
github.com/onsi/ginkgo/v2 v2.8.0
github.com/onsi/gomega v1.26.0
k8s.io/api v0.25.6
k8s.io/apimachinery v0.25.6
k8s.io/client-go v0.25.6
k8s.io/utils v0.0.0-20230202215443-34013725500c
sigs.k8s.io/controller-runtime v0.13.1
github.com/onsi/ginkgo/v2 v2.9.4
github.com/onsi/gomega v1.27.6
k8s.io/api v0.26.4
k8s.io/apimachinery v0.26.4
k8s.io/client-go v0.26.4
k8s.io/utils v0.0.0-20230505201702-9f6742963106
sigs.k8s.io/controller-runtime v0.14.6
)

require (
cloud.google.com/go/compute v1.14.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
github.com/cybozu-go/log v1.7.0 // indirect
github.com/cybozu-go/netutil v1.4.4 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // 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/viper v1.15.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/vishvananda/netlink v1.2.1-beta.2 // indirect
github.com/vishvananda/netns v0.0.3 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
)

require (
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.27 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.20 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cybozu-go/log v1.7.0 // indirect
github.com/cybozu-go/netutil v1.4.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-logr/logr v1.2.3
github.com/go-logr/logr v1.2.4
github.com/go-logr/zapr v1.2.3
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.20.0 // indirect
github.com/go-openapi/swag v0.19.14 // 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.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.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.12 // 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.7 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2 // 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/v2 v2.0.6 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.12.2 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // 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/robfig/cron v1.2.0
github.com/robfig/cron/v3 v3.0.1
github.com/spf13/cobra v1.6.1
github.com/spf13/afero v1.9.3 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.7.0
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.15.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/vishvananda/netlink v1.2.1-beta.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
go.uber.org/zap v1.24.0
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/term v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/time v0.1.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/term v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.8.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // 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.0 // indirect
k8s.io/component-base v0.25.0 // indirect
k8s.io/apiextensions-apiserver v0.26.1 // indirect
k8s.io/component-base v0.26.1 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0
Expand Down
Loading

0 comments on commit 52678d0

Please sign in to comment.