Skip to content

Commit

Permalink
Merge pull request #177 from spotahome/slok/k8s-1.28
Browse files Browse the repository at this point in the history
Update kooper for k8s 1.28 release
  • Loading branch information
slok authored Sep 4, 2023
2 parents 63749bd + 29a95bd commit 7e6a388
Show file tree
Hide file tree
Showing 10 changed files with 177 additions and 762 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
name: Check
runs-on: ubuntu-latest
# Execute the checks inside the container instead the VM.
container: golangci/golangci-lint:v1.53.3-alpine
container: golangci/golangci-lint:v1.54.2-alpine
steps:
- uses: actions/checkout@v3
- run: ./hack/scripts/check.sh
Expand All @@ -28,7 +28,7 @@ jobs:
needs: [check, unit-test]
strategy:
matrix:
kubernetes: [1.24.15, 1.25.11, 1.26.6, 1.27.3]
kubernetes: [1.24.15, 1.25.11, 1.26.6, 1.27.3, 1.28.0]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## [unreleased]

## [2.5.0] - 2023-09-04

- Update Kubernetes libraries for 1.28.
- Change resource locks from configmaps to leases.

## [2.4.0] - 2023-07-04

- Update Kubernetes libraries for 1.27.
Expand Down Expand Up @@ -128,7 +133,8 @@ This release breaks controllers constructors to allow passing a metrics recorder
- sequential controller implementation.
- Dependencies managed by dep and vendored.

[unreleased]: https://github.com/spotahome/kooper/compare/v2.4.0...HEAD
[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.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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/spotahome/kooper)](https://goreportcard.com/report/github.com/spotahome/kooper)
[![Apache 2 licensed](https://img.shields.io/badge/license-Apache2-blue.svg)](https://raw.githubusercontent.com/spotahome/kooper/master/LICENSE)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/spotahome/kooper)](https://github.com/spotahome/kooper/releases/latest)
![Kubernetes release](https://img.shields.io/badge/Kubernetes-v1.25-green?logo=Kubernetes&style=flat&color=326CE5&logoColor=white)
![Kubernetes release](https://img.shields.io/badge/Kubernetes-v1.28-green?logo=Kubernetes&style=flat&color=326CE5&logoColor=white)

Kooper is a Go library to create simple and flexible Kubernetes [controllers]/operators, in a fast, decoupled and easy way.

Expand Down
2 changes: 1 addition & 1 deletion controller/leaderelection/leaderelection.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (r *runner) initResourceLock() error {
recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: r.key, Host: id})

rl, err := resourcelock.New(
resourcelock.ConfigMapsLeasesResourceLock,
resourcelock.LeasesResourceLock,
r.namespace,
r.key,
r.k8scli.CoreV1(),
Expand Down
67 changes: 28 additions & 39 deletions examples/pod-terminator-operator/go.mod
Original file line number Diff line number Diff line change
@@ -1,70 +1,59 @@
module github.com/spotahome/kooper/examples/pod-terminator-operator/v2

go 1.19
go 1.21

replace github.com/spotahome/kooper/v2 => ../../

require (
github.com/sirupsen/logrus v1.9.0
github.com/sirupsen/logrus v1.9.3
github.com/spotahome/kooper/v2 v2.2.0
github.com/stretchr/testify v1.8.1
k8s.io/api v0.25.3
k8s.io/apiextensions-apiserver v0.25.3
k8s.io/apimachinery v0.25.3
k8s.io/client-go v0.25.3
github.com/stretchr/testify v1.8.4
k8s.io/api v0.28.1
k8s.io/apiextensions-apiserver v0.28.1
k8s.io/apimachinery v0.28.1
k8s.io/client-go v0.28.1
)

require (
cloud.google.com/go v0.97.0 // indirect
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/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.8.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
github.com/go-openapi/jsonreference v0.19.5 // indirect
github.com/go-openapi/swag v0.19.14 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/mailru/easyjson v0.7.7 // 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/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/term v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.30.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/klog/v2 v2.70.1 // indirect
k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // 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
)
Loading

0 comments on commit 7e6a388

Please sign in to comment.