Skip to content

Commit

Permalink
Support for Kube 1.32 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
witomlin authored Dec 12, 2024
1 parent 33937e2 commit 86fc13e
Show file tree
Hide file tree
Showing 59 changed files with 1,195 additions and 1,253 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.9'
go-version: '1.23.3'

- name: Test
run: make test-run-unit
Expand All @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
arg:
- '1.31'
- '1.32'

steps:
- name: Checkout repository
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22.9'
go-version: '1.23.3'

- name: Set up Kind
uses: helm/[email protected]
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@
- Based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.5.0
2024-12-12

### Added
- Support for Kube 1.32.
- Container resizes now performed through `resize` subresource.
- Ability to register an additional CA certificate (or chain) when building the kind node image for integration tests
and sandbox scripts.

### Changed
- Upgrades Go to 1.23.3.
- Upgrades all dependencies.
- Renames controller-runtime controller name to shorten.

### Removed
- Examination of `AllocatedResources` within container status.
- Not required and now behind feature gate in Kube 1.32.
- Controller name label from CSA metrics.

### Fixed
- Inconsistent status updates through informer cache race.
- CSA metrics not being published.

### Helm Chart
[1.4.0](charts/container-startup-autoscaler/CHANGELOG.md#140)

| Kube Version | Compatible? | `In-place Update of Pod Resources` Maturity |
|:------------:|:-----------:|:-------------------------------------------:|
| 1.32 | ✔️ | Alpha |
| 1.31 || Alpha |
| 1.30 || Alpha |
| 1.29 || Alpha |
| 1.28 || Alpha |
| 1.27 || Alpha |

## 0.4.0
2024-11-29

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM --platform=$BUILDPLATFORM golang:1.22.9 AS build
FROM --platform=$BUILDPLATFORM golang:1.23.3 AS build
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETOS
Expand Down
104 changes: 68 additions & 36 deletions README.md

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions charts/container-startup-autoscaler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
- Based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 1.4.0
2024-12-12

### Added
- Support for Kube 1.32.
- Cluster role includes `pods/resize` rule.

### Changed
- CSA version.

### CSA Version
[0.5.0](../../CHANGELOG.md#050)

## 1.3.0
2024-11-29

Expand Down
4 changes: 2 additions & 2 deletions charts/container-startup-autoscaler/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: container-startup-autoscaler
description: >
container-startup-autoscaler is a Kubernetes controller that modifies the CPU and/or memory resources of containers
depending on whether they're starting up.
version: 1.3.0
appVersion: "0.4.0"
version: 1.4.0
appVersion: "0.5.0"
home: https://github.com/ExpediaGroup/container-startup-autoscaler/README.md
sources:
- https://github.com/ExpediaGroup/container-startup-autoscaler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "patch", "update", "watch"]
- apiGroups: [""]
resources: ["pods/resize"]
verbs: ["patch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch", "update"]
Expand Down
5 changes: 1 addition & 4 deletions cmd/container-startup-autoscaler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ func run(_ *cobra.Command, _ []string) {
logging.Fatalf(nil, err, "unable to add healthz check")
}

csaController, err := controller.NewController(controllerConfig, runtimeManager)
if err != nil {
logging.Fatalf(nil, err, "unable to create controller")
}
csaController := controller.NewController(controllerConfig, runtimeManager)

if err = csaController.Initialize(); err != nil {
logging.Fatalf(nil, err, "unable to initialize controller")
Expand Down
98 changes: 50 additions & 48 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,78 +1,80 @@
module github.com/ExpediaGroup/container-startup-autoscaler

go 1.22.9
go 1.23.3

require (
github.com/avast/retry-go/v4 v4.5.0
github.com/go-logr/logr v1.3.0
github.com/avast/retry-go/v4 v4.6.0
github.com/go-logr/logr v1.4.2
github.com/go-logr/zerologr v1.2.3
github.com/google/uuid v1.4.0
github.com/google/uuid v1.6.0
github.com/orcaman/concurrent-map/v2 v2.0.1
github.com/prometheus/client_golang v1.17.0
github.com/rs/zerolog v1.31.0
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.4
github.com/tonglil/buflogr v1.0.1
k8s.io/api v0.28.3
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
k8s.io/component-base v0.28.3
sigs.k8s.io/controller-runtime v0.16.3
github.com/prometheus/client_golang v1.20.5
github.com/rs/zerolog v1.33.0
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.10.0
github.com/tonglil/buflogr v1.1.1
k8s.io/api v0.32.0
k8s.io/apimachinery v0.32.0
k8s.io/client-go v0.32.0
k8s.io/component-base v0.32.0
sigs.k8s.io/controller-runtime v0.19.2
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // 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.11.0 // indirect
github.com/evanphx/json-patch v5.7.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.7.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-openapi/jsonpointer v0.20.0 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.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/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-models v0.6.8 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/imdario/mergo v0.3.16 // 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/klauspost/compress v1.17.11 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.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/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.60.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.1 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.3.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/x448/float16 v0.8.4 // indirect
go.opentelemetry.io/otel v1.28.0 // indirect
go.opentelemetry.io/otel/trace v1.28.0 // indirect
golang.org/x/exp v0.0.0-20241108190413-2d47ceb2692f // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/term v0.26.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/time v0.8.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/protobuf v1.35.2 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.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.110.1 // indirect
k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20241127205056-99599406b04f // indirect
k8s.io/utils v0.0.0-20241104163129-6fe5fd82f078 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.3 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
)
Loading

0 comments on commit 86fc13e

Please sign in to comment.