Skip to content

Commit

Permalink
Update dependencies for Go 1.22 and K8s 1.29
Browse files Browse the repository at this point in the history
Signed-off-by: Xabier Larrakoetxea <[email protected]>
  • Loading branch information
slok committed Mar 31, 2024
1 parent 7e6a388 commit 5fae449
Show file tree
Hide file tree
Showing 19 changed files with 697 additions and 203 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ jobs:
name: Check
runs-on: ubuntu-latest
# Execute the checks inside the container instead the VM.
container: golangci/golangci-lint:v1.54.2-alpine
container: golangci/golangci-lint:v1.57.2-alpine
steps:
- uses: actions/checkout@v3
- run: ./hack/scripts/check.sh
- run: |
# We need this go flag because it started to error after golangci-lint is using Go 1.21.
# TODO(slok): Remove it on next (>1.54.1) golangci-lint upgrade to check if this problem has gone.
export GOFLAGS="-buildvcs=false"
./hack/scripts/check.sh
unit-test:
name: Unit test
Expand All @@ -28,15 +32,16 @@ jobs:
needs: [check, unit-test]
strategy:
matrix:
kubernetes: [1.24.15, 1.25.11, 1.26.6, 1.27.3, 1.28.0]
kubernetes:
[1.23.17, 1.24.17, 1.25.16, 1.26.14, 1.27.11, 1.28.7, 1.29.2]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Execute tests
env:
KIND_VERSION: v0.20.0
KIND_VERSION: v0.22.0
run: |
# Get dependencies.
echo "Getting dependencies..."
Expand All @@ -45,7 +50,4 @@ jobs:
# Start cluster.
echo "Executing ${{ matrix.kubernetes }} Kubernetes tests..."
KUBERNETES_VERSION=${{ matrix.kubernetes }} make ci-integration-test
KUBERNETES_VERSION=${{ matrix.kubernetes }} make ci-integration-test
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## [unreleased]

- Update Kubernetes libraries for 1.29.
- Update Go version to v1.22.

## [2.5.0] - 2023-09-04

- Update Kubernetes libraries for 1.28.
Expand Down Expand Up @@ -134,7 +137,7 @@ This release breaks controllers constructors to allow passing a metrics recorder
- Dependencies managed by dep and vendored.

[unreleased]: https://github.com/spotahome/kooper/compare/v2.5.0...HEAD
[2.4.0]: https://github.com/spotahome/kooper/compare/v2.4.0...v2.5.0
[2.5.0]: https://github.com/spotahome/kooper/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/spotahome/kooper/compare/v2.3.0...v2.4.0
[2.3.0]: https://github.com/spotahome/kooper/compare/v2.2.0...v2.3.0
[2.2.0]: https://github.com/spotahome/kooper/compare/v2.1.0...v2.2.0
Expand Down
6 changes: 5 additions & 1 deletion controller/controllermock/handler.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docker/dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.20.3
FROM golang:1.22

ARG GOLANGCI_LINT_VERSION="1.53.3"
ARG MOCKERY_VERSION="2.30.16"
ARG GOLANGCI_LINT_VERSION="1.57.2"
ARG MOCKERY_VERSION="2.42.1"
ARG ostype=Linux

RUN apt-get update && apt-get install -y \
Expand Down
31 changes: 9 additions & 22 deletions examples/pod-terminator-operator/Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,13 @@

CODE_GENERATOR_IMAGE := ghcr.io/slok/kube-code-generator:v1.27.0
CRD_GENERATOR_IMAGE := ghcr.io/slok/kube-code-generator:v1.27.0
DIRECTORY := $(PWD)
ROOT_DIRECTORY := $(DIRECTORY)/../..
CODE_GENERATOR_PACKAGE := github.com/spotahome/kooper/examples/pod-terminator-operator/v2
IMAGE_GEN=ghcr.io/slok/kube-code-generator:v0.1.0

generate: generate-client generate-crd
default: generate

generate-client:
docker run --rm -it \
-v $(DIRECTORY):/go/src/$(CODE_GENERATOR_PACKAGE) \
-e PROJECT_PACKAGE=$(CODE_GENERATOR_PACKAGE) \
-e CLIENT_GENERATOR_OUT=$(CODE_GENERATOR_PACKAGE)/client/k8s \
-e APIS_ROOT=$(CODE_GENERATOR_PACKAGE)/apis \
-e GROUPS_VERSION="chaos:v1alpha1" \
-e GENERATION_TARGETS="deepcopy,client" \
$(CODE_GENERATOR_IMAGE)
generate:
@docker run --rm -v ${PWD}:/app "${IMAGE_GEN}" \
--apis-in ./apis \
--go-gen-out ./client/k8s \
--crd-gen-out ./manifests

generate-crd:
docker run -it --rm \
-v $(ROOT_DIRECTORY):/src \
-e GO_PROJECT_ROOT=/src/examples/pod-terminator-operator \
-e CRD_TYPES_PATH=/src/examples/pod-terminator-operator/apis \
-e CRD_OUT_PATH=/src/examples/pod-terminator-operator/manifests \
$(CRD_GENERATOR_IMAGE) update-crd.sh
generate-debug:
@docker run --entrypoint /bin/bash --rm -it -v ${PWD}:/app "${IMAGE_GEN}"

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5fae449

Please sign in to comment.