Skip to content

Commit ac3d4eb

Browse files
authored
Merge pull request #183 from spotahome/slok/k129
Update dependencies for Go 1.22 and K8s 1.29
2 parents 7e6a388 + 5fae449 commit ac3d4eb

File tree

19 files changed

+697
-203
lines changed

19 files changed

+697
-203
lines changed

.github/workflows/ci.yaml

+10-8
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ jobs:
77
name: Check
88
runs-on: ubuntu-latest
99
# Execute the checks inside the container instead the VM.
10-
container: golangci/golangci-lint:v1.54.2-alpine
10+
container: golangci/golangci-lint:v1.57.2-alpine
1111
steps:
1212
- uses: actions/checkout@v3
13-
- run: ./hack/scripts/check.sh
13+
- run: |
14+
# We need this go flag because it started to error after golangci-lint is using Go 1.21.
15+
# TODO(slok): Remove it on next (>1.54.1) golangci-lint upgrade to check if this problem has gone.
16+
export GOFLAGS="-buildvcs=false"
17+
./hack/scripts/check.sh
1418
1519
unit-test:
1620
name: Unit test
@@ -28,15 +32,16 @@ jobs:
2832
needs: [check, unit-test]
2933
strategy:
3034
matrix:
31-
kubernetes: [1.24.15, 1.25.11, 1.26.6, 1.27.3, 1.28.0]
35+
kubernetes:
36+
[1.23.17, 1.24.17, 1.25.16, 1.26.14, 1.27.11, 1.28.7, 1.29.2]
3237
steps:
3338
- uses: actions/checkout@v3
3439
- uses: actions/setup-go@v4
3540
with:
3641
go-version-file: go.mod
3742
- name: Execute tests
3843
env:
39-
KIND_VERSION: v0.20.0
44+
KIND_VERSION: v0.22.0
4045
run: |
4146
# Get dependencies.
4247
echo "Getting dependencies..."
@@ -45,7 +50,4 @@ jobs:
4550
4651
# Start cluster.
4752
echo "Executing ${{ matrix.kubernetes }} Kubernetes tests..."
48-
KUBERNETES_VERSION=${{ matrix.kubernetes }} make ci-integration-test
49-
50-
51-
53+
KUBERNETES_VERSION=${{ matrix.kubernetes }} make ci-integration-test

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## [unreleased]
22

3+
- Update Kubernetes libraries for 1.29.
4+
- Update Go version to v1.22.
5+
36
## [2.5.0] - 2023-09-04
47

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

136139
[unreleased]: https://github.com/spotahome/kooper/compare/v2.5.0...HEAD
137-
[2.4.0]: https://github.com/spotahome/kooper/compare/v2.4.0...v2.5.0
140+
[2.5.0]: https://github.com/spotahome/kooper/compare/v2.4.0...v2.5.0
138141
[2.4.0]: https://github.com/spotahome/kooper/compare/v2.3.0...v2.4.0
139142
[2.3.0]: https://github.com/spotahome/kooper/compare/v2.2.0...v2.3.0
140143
[2.2.0]: https://github.com/spotahome/kooper/compare/v2.1.0...v2.2.0

controller/controllermock/handler.go

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker/dev/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM golang:1.20.3
1+
FROM golang:1.22
22

3-
ARG GOLANGCI_LINT_VERSION="1.53.3"
4-
ARG MOCKERY_VERSION="2.30.16"
3+
ARG GOLANGCI_LINT_VERSION="1.57.2"
4+
ARG MOCKERY_VERSION="2.42.1"
55
ARG ostype=Linux
66

77
RUN apt-get update && apt-get install -y \
+9-22
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,13 @@
11

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

8-
generate: generate-client generate-crd
4+
default: generate
95

10-
generate-client:
11-
docker run --rm -it \
12-
-v $(DIRECTORY):/go/src/$(CODE_GENERATOR_PACKAGE) \
13-
-e PROJECT_PACKAGE=$(CODE_GENERATOR_PACKAGE) \
14-
-e CLIENT_GENERATOR_OUT=$(CODE_GENERATOR_PACKAGE)/client/k8s \
15-
-e APIS_ROOT=$(CODE_GENERATOR_PACKAGE)/apis \
16-
-e GROUPS_VERSION="chaos:v1alpha1" \
17-
-e GENERATION_TARGETS="deepcopy,client" \
18-
$(CODE_GENERATOR_IMAGE)
6+
generate:
7+
@docker run --rm -v ${PWD}:/app "${IMAGE_GEN}" \
8+
--apis-in ./apis \
9+
--go-gen-out ./client/k8s \
10+
--crd-gen-out ./manifests
1911

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

examples/pod-terminator-operator/client/k8s/clientset/versioned/doc.go

-4
This file was deleted.

examples/pod-terminator-operator/client/k8s/informers/externalversions/chaos/interface.go

+30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/pod-terminator-operator/client/k8s/informers/externalversions/chaos/v1alpha1/interface.go

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/pod-terminator-operator/client/k8s/informers/externalversions/chaos/v1alpha1/podterminator.go

+73
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)