Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Update dependencies (#13)
Browse files Browse the repository at this point in the history
* Update dependencies

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

* Add maintenance docs

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

* Update CHANGELOG.md

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

---------

Signed-off-by: zeroalphat <[email protected]>
  • Loading branch information
zeroalphat authored Mar 26, 2024
1 parent 217c93b commit 2a51113
Show file tree
Hide file tree
Showing 14 changed files with 234 additions and 278 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Small tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
Expand All @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-22.04
# TODO: add test matrix for kubernetes version
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup golang
Expand All @@ -47,8 +47,8 @@ jobs:
run: |
echo "GORELEASER_CURRENT_TAG=$(git describe --tags --abbrev=0 --match "v*" || echo v0.0.0)" >> $GITHUB_ENV
- name: GoReleaser
uses: 'goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7'
uses: 'goreleaser/goreleaser-action@v5'
with:
distribution: goreleaser
version: v1.18.2
version: v1.24.0
args: --snapshot --skip-publish --rm-dist
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Push Container Image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build images
run: |
docker build -t cat-gate:dev .
Expand All @@ -24,15 +24,15 @@ jobs:
needs: image
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: GoReleaser
uses: 'goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7'
uses: 'goreleaser/goreleaser-action@v5'
with:
distribution: goreleaser
version: v1.18.2
version: v1.24.0
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Changed

- Update dependencies [#13](https://github.com/cybozu-go/cat-gate/pull/13)

## [0.1.1]

### Changed
- Label container image using the repository name (#10)
- Label container image using the repository name [#10](https://github.com/cybozu-go/cat-gate/pull/10)

## [0.1.0]

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 ghcr.io/cybozu/golang:1.20-jammy as builder
FROM ghcr.io/cybozu/golang:1.22-jammy as builder
ARG TARGETOS
ARG TARGETARCH

Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Image URL to use all building/pushing image targets
IMG ?= cat-gate:dev
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.27.1
CERT_MANAGER_VERSION := 1.11.2
ENVTEST_K8S_VERSION = 1.29.1
CERT_MANAGER_VERSION := 1.14.4

# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -140,7 +140,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
.PHONY: start
start:
ctlptl apply -f ./cluster.yaml
kubectl apply -f https://github.com/jetstack/cert-manager/releases/v$(CERT_MANAGER_VERSION)/download/cert-manager.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v$(CERT_MANAGER_VERSION)/cert-manager.yaml
kubectl -n cert-manager wait --for=condition=available --timeout=180s --all deployments

.PHONY: stop
Expand All @@ -161,8 +161,8 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v5.0.1
CONTROLLER_TOOLS_VERSION ?= v0.12.0
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
Expand Down
12 changes: 6 additions & 6 deletions aqua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# - all
registries:
- type: standard
ref: v4.43.0 # renovate: depName=aquaproj/aqua-registry
ref: v4.155.0 # renovate: depName=aquaproj/aqua-registry
packages:
- name: kubernetes/kubectl@v1.28.1
- name: kubernetes-sigs/kustomize@kustomize/v5.1.1
- name: tilt-dev/[email protected].4
- name: tilt-dev/[email protected].21
- name: mikefarah/yq@v4.35.1
- name: kubernetes/kubectl@v1.29.3
- name: kubernetes-sigs/kustomize@kustomize/v5.3.0
- name: tilt-dev/[email protected].11
- name: tilt-dev/[email protected].28
- name: mikefarah/yq@v4.43.1
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-cat-gate-dev
product: kind
kubernetesVersion: v1.27.3
kubernetesVersion: v1.29.1
registry: cat-gate-registry
12 changes: 9 additions & 3 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/healthz"
"sigs.k8s.io/controller-runtime/pkg/log/zap"
metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server"
"sigs.k8s.io/controller-runtime/pkg/webhook"

"github.com/cybozu-go/cat-gate/hooks"
"github.com/cybozu-go/cat-gate/internal/controller"
Expand Down Expand Up @@ -66,9 +68,13 @@ func main() {
ctrl.SetLogger(zap.New(zap.UseFlagOptions(&opts)))

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Scheme: scheme,
MetricsBindAddress: metricsAddr,
Port: 9443,
Scheme: scheme,
Metrics: metricsserver.Options{
BindAddress: metricsAddr,
},
WebhookServer: webhook.NewServer(webhook.Options{
Port: 9443,
}),
HealthProbeBindAddress: probeAddr,
LeaderElection: enableLeaderElection,
LeaderElectionID: "ca35e456.cybozu.io",
Expand Down
21 changes: 21 additions & 0 deletions docs/maintenance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Maintenance

## How to update supported Kubernetes

Cat-gate supports the three latest Kubernetes versions.
If a new Kubernetes is released, please update the following files.

- Update Kubernetes version in `Makefile` and `e2e/Makefile`.
- Update controller-runtime version in `Makefile`.
- Update kubectl version in `aqua.yaml`.
- Update `k8s.io/*` and `sigs.k8s.io/controller-runtime` packages version in `go.mod`.
- Update Kubernetes version in `cluster.yaml`.

If Kubernetes or controller-runtime API has changed, please fix the relevant source code.

## How to update dependencies

- Update tool version in `Makefile` and `e2e/Makefile`.
- Update `aqua.yaml`.
- Update `Dockerfile`.
- Update GitHub Actions workflow files in `.github/workflows/ci.yaml` and `.github/workflows/release.yaml`.
6 changes: 3 additions & 3 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.27.1
CERT_MANAGER_VERSION := 1.11.2
E2ETEST_K8S_VERSION := 1.29.2
CERT_MANAGER_VERSION := 1.14.4

PROJECT_DIR := $(CURDIR)/../
BIN_DIR := $(PROJECT_DIR)/bin
Expand Down Expand Up @@ -42,7 +42,7 @@ start:
.PHONY: test
test:
env RUN_E2E=1 \
go test -v -race . -ginkgo.progress -ginkgo.v -ginkgo.fail-fast
go test -v -race . -ginkgo.v -ginkgo.fail-fast

.PHONY: logs
logs:
Expand Down
93 changes: 46 additions & 47 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,73 +1,72 @@
module github.com/cybozu-go/cat-gate

go 1.20
go 1.22

require (
github.com/onsi/ginkgo/v2 v2.9.5
github.com/onsi/gomega v1.27.7
k8s.io/api v0.27.2
k8s.io/apimachinery v0.27.2
k8s.io/client-go v0.27.2
sigs.k8s.io/controller-runtime v0.15.0
github.com/onsi/ginkgo/v2 v2.17.1
github.com/onsi/gomega v1.32.0
k8s.io/api v0.29.3
k8s.io/apimachinery v0.29.3
k8s.io/client-go v0.29.3
sigs.k8s.io/controller-runtime v0.17.2
)

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.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.4 // indirect
github.com/go-logr/zapr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/emicklei/go-restful/v3 v3.12.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logr/logr v1.4.1 // indirect
github.com/go-logr/zapr v1.3.0 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // 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.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-20210720184732-4bb14d4b1be1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240320155624-b11c3daa6f07 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // 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/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.15.1 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.51.1 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.9.1 // indirect
gomodules.xyz/jsonpatch/v2 v2.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/exp v0.0.0-20240318143956-a85f2c67cd81 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.18.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.19.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.27.2 // indirect
k8s.io/component-base v0.27.2 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
k8s.io/apiextensions-apiserver v0.29.3 // indirect
k8s.io/component-base v0.29.3 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240322212309-b815d8309940 // indirect
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // 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 2a51113

Please sign in to comment.