Skip to content

Commit 12e1779

Browse files
Merge branch 'main' into feat_backoff
2 parents c61bdf1 + 5382813 commit 12e1779

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+2924
-1462
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,26 @@ Here is an overview of all new **experimental** features:
8383
- **GitHub Scaler**: Filter workflows via query parameter for improved queue count accuracy ([#6519](https://github.com/kedacore/keda/pull/6519))
8484
- **Github Scaler**: Implement backoff when receive rate limit errors ([#6643](https://github.com/kedacore/keda/issues/6643))
8585
- **IBMMQ Scaler**: Handling StatusNotFound in IBMMQ scaler ([#6472](https://github.com/kedacore/keda/pull/6472))
86+
- **MongoDB Scaler**: Support float queryValue for MongoDB scaler ([#6574](https://github.com/kedacore/keda/issues/6574))
8687
- **RabbitMQ Scaler**: Support use of the ‘vhostName’ parameter in the ‘TriggerAuthentication’ resource ([#6369](https://github.com/kedacore/keda/issues/6369))
88+
- **Selenium Grid**: Add trigger param for Node enables managed downloads capability ([#6570](https://github.com/kedacore/keda/pull/6570))
8789
- **Selenium Grid**: Add trigger param to set custom capabilities for matching specific Nodes ([#6536](https://github.com/kedacore/keda/issues/6536))
8890

8991
### Fixes
9092

9193
- **General**: Centralize and improve automaxprocs configuration with proper structured logging ([#5970](https://github.com/kedacore/keda/issues/5970))
94+
- **General**: Fix CVE-2025-27144 and CVE-2025-22868 ([#6613](https://github.com/kedacore/keda/issues/6613))
95+
- **General**: Fix CVE-2025-29786 ([#6637](https://github.com/kedacore/keda/issues/6637))
96+
- **General**: Fix CVE-2025-30204 ([#6641](https://github.com/kedacore/keda/pull/6641))
9297
- **General**: Fix event text when deactivation fails ([#6469](https://github.com/kedacore/keda/issues/6469))
98+
- **General**: Make sure the exposed metrics (from KEDA operator) are updated when there is a change to triggers ([#6618](https://github.com/kedacore/keda/pull/6618))
9399
- **General**: Paused ScaledObject count is reported correctly after operator restart ([#6321](https://github.com/kedacore/keda/issues/6321))
94100
- **General**: ScaledJobs ready status set to true when recoverred problem ([#6329](https://github.com/kedacore/keda/pull/6329))
95101
- **AWS Scalers**: Add AWS region to the AWS Config Cache key ([#6128](https://github.com/kedacore/keda/issues/6128))
96102
- **External Scaler**: Support server TLS without custom CA ([#6606](https://github.com/kedacore/keda/pull/6606))
103+
- **GCP Storage**: GCP Storage scaler ignores folders ([#6531](https://github.com/kedacore/keda/issues/6531))
104+
- **Metrics API**: Fix text format parsing error resulting in unexpected end of input stream ([#6559](https://github.com/kedacore/keda/issues/6559))
105+
- **NATS JetStream**: Support for looking up account using an ID ([#6611](https://github.com/kedacore/keda/pull/6611))
97106
- **Redis Streams**: Allow default value of 0 for activationLagCount ([#6478](https://github.com/kedacore/keda/issues/6478))
98107
- **Selenium Grid**: Scaler logic on platformName is set empty or `any` ([#6477](https://github.com/kedacore/keda/issues/6477))
99108

@@ -116,6 +125,7 @@ New deprecation(s):
116125
- **General**: Add debug logs tracking validation of ScaledObjects on webhook ([#6498](https://github.com/kedacore/keda/pull/6498))
117126
- **General**: Fix fallback validation check bug ([#6407](https://github.com/kedacore/keda/pull/6407))
118127
- **General**: New eventreason KEDAScalersInfo to display important information ([#6328](https://github.com/kedacore/keda/issues/6328))
128+
- **Apache Kafka Scaler**: Remove unused awsEndpoint in Apache Kafka scaler ([#6627](https://github.com/kedacore/keda/pull/6627))
119129
- **External Scalers**: Allow `float64` values in externalmetrics' `MetricValue` & `TargetSize`. The old fields are still there because of backward compatibility. ([#5159](https://github.com/kedacore/keda/issues/5159))
120130

121131
## v2.16.1

ROADMAP.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Here is an overview of our current release estimations:
1414

1515
| Version | Estimated Release Date |
1616
|:--------|:-----------------------------------------------------|
17-
| v2.17 | Feb 19th, 2025 |
18-
| v2.18 | Apr 30th, 2025 |
19-
| v2.19 | July 30th, 2025 |
17+
| v2.17 | Mar 31st, 2025 (rough estimate) |
18+
| v2.18 | TBD (need to resolve https://github.com/kedacore/governance/issues/122) |
19+
| v2.19 | TBD (need to resolve https://github.com/kedacore/governance/issues/122) |
2020

2121
Here is an overview of our previous releases:
2222

controllers/keda/scaledjob_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ func (r *ScaledJobReconciler) updatePromMetrics(scaledJob *kedav1alpha1.ScaledJo
372372
metricscollector.IncrementCRDTotal(metricscollector.ScaledJobResource, scaledJob.Namespace)
373373
metricsData.namespace = scaledJob.Namespace
374374

375+
metricscollector.DeleteScalerMetrics(scaledJob.Namespace, scaledJob.Name, false)
375376
triggerTypes := make([]string, 0, len(scaledJob.Spec.Triggers))
376377
for _, trigger := range scaledJob.Spec.Triggers {
377378
metricscollector.IncrementTriggerTotal(trigger.Type)

controllers/keda/scaledobject_controller.go

+1
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,7 @@ func (r *ScaledObjectReconciler) updatePromMetrics(scaledObject *kedav1alpha1.Sc
587587
metricscollector.IncrementCRDTotal(metricscollector.ScaledObjectResource, scaledObject.Namespace)
588588
metricsData.namespace = scaledObject.Namespace
589589

590+
metricscollector.DeleteScalerMetrics(scaledObject.Namespace, scaledObject.Name, true)
590591
triggerTypes := make([]string, 0, len(scaledObject.Spec.Triggers))
591592
for _, trigger := range scaledObject.Spec.Triggers {
592593
metricscollector.IncrementTriggerTotal(trigger.Type)

go.mod

+6-9
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ require (
4545
github.com/dysnix/predictkube-libs v0.0.4-0.20230109175007-5a82fccd31c7
4646
github.com/dysnix/predictkube-proto v0.0.0-20241017230806-4c74c627f2bb
4747
github.com/elastic/go-elasticsearch/v7 v7.17.10
48-
github.com/expr-lang/expr v1.16.9
48+
github.com/expr-lang/expr v1.17.0
4949
github.com/go-kivik/couchdb/v3 v3.4.1
5050
github.com/go-kivik/kivik/v3 v3.2.4
5151
github.com/go-logr/logr v1.4.2
@@ -95,7 +95,7 @@ require (
9595
go.opentelemetry.io/otel/metric v1.33.0
9696
go.temporal.io/sdk v1.31.0
9797
go.uber.org/mock v0.5.0
98-
golang.org/x/oauth2 v0.24.0
98+
golang.org/x/oauth2 v0.27.0
9999
golang.org/x/sync v0.10.0
100100
google.golang.org/api v0.214.0
101101
google.golang.org/grpc v1.69.2
@@ -159,9 +159,6 @@ replace (
159159
// we need a version with a proper license
160160
github.com/chzyer/logex => github.com/chzyer/logex v1.2.1
161161

162-
// https://github.com/advisories/GHSA-29wx-vh33-7x7r
163-
github.com/golang-jwt/jwt/v4 => github.com/golang-jwt/jwt/v4 v4.5.1
164-
165162
// we use an updated package to avoid other vulnerabilities on its deps (like github.com/dgrijalva/jwt-go)
166163
github.com/spf13/viper => github.com/spf13/viper v1.19.0
167164

@@ -240,7 +237,7 @@ require (
240237
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
241238
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
242239
github.com/go-errors/errors v1.5.1 // indirect
243-
github.com/go-jose/go-jose/v4 v4.0.1 // indirect
240+
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
244241
github.com/go-kit/log v0.2.1 // indirect
245242
github.com/go-logfmt/logfmt v0.6.0 // indirect
246243
github.com/go-logr/stdr v1.2.2 // indirect
@@ -255,8 +252,8 @@ require (
255252
github.com/gofrs/uuid v4.4.0+incompatible // indirect
256253
github.com/gogo/protobuf v1.3.2 // indirect
257254
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
258-
github.com/golang-jwt/jwt/v4 v4.5.1 // indirect
259-
github.com/golang-jwt/jwt/v5 v5.2.1 // indirect
255+
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
256+
github.com/golang-jwt/jwt/v5 v5.2.2 // indirect
260257
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
261258
github.com/golang-sql/sqlexp v0.1.0 // indirect
262259
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
@@ -369,7 +366,7 @@ require (
369366
go.uber.org/automaxprocs v1.6.0
370367
go.uber.org/multierr v1.11.0 // indirect
371368
go.uber.org/zap v1.27.0 // indirect
372-
golang.org/x/crypto v0.31.0
369+
golang.org/x/crypto v0.32.0
373370
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
374371
golang.org/x/mod v0.22.0 // indirect
375372
golang.org/x/net v0.33.0 // indirect

go.sum

+13-10
Original file line numberDiff line numberDiff line change
@@ -1670,8 +1670,8 @@ github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lSh
16701670
github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
16711671
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
16721672
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
1673-
github.com/expr-lang/expr v1.16.9 h1:WUAzmR0JNI9JCiF0/ewwHB1gmcGw5wW7nWt8gc6PpCI=
1674-
github.com/expr-lang/expr v1.16.9/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4=
1673+
github.com/expr-lang/expr v1.17.0 h1:+vpszOyzKLQXC9VF+wA8cVA0tlA984/Wabc/1hF9Whg=
1674+
github.com/expr-lang/expr v1.17.0/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4=
16751675
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a h1:yDWHCSQ40h88yih2JAcL6Ls/kVkSE8GFACTGVnMPruw=
16761676
github.com/facebookgo/clock v0.0.0-20150410010913-600d898af40a/go.mod h1:7Ga40egUymuWXxAe151lTNnCv97MddSOVsjpPPkityA=
16771677
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
@@ -1710,8 +1710,8 @@ github.com/go-fonts/stix v0.1.0/go.mod h1:w/c1f0ldAUlJmLBvlbkvVXLAD+tAMqobIIQpmn
17101710
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
17111711
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
17121712
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
1713-
github.com/go-jose/go-jose/v4 v4.0.1 h1:QVEPDE3OluqXBQZDcnNvQrInro2h0e4eqNbnZSWqS6U=
1714-
github.com/go-jose/go-jose/v4 v4.0.1/go.mod h1:WVf9LFMHh/QVrmqrOfqun0C45tMe3RoiKJMPvgWwLfY=
1713+
github.com/go-jose/go-jose/v4 v4.0.5 h1:M6T8+mKZl/+fNNuFHvGIzDz7BTLQPIounk/b9dw3AaE=
1714+
github.com/go-jose/go-jose/v4 v4.0.5/go.mod h1:s3P1lRrkT8igV8D9OjyL4WRyHvjB6a4JSllnOrmmBOA=
17151715
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
17161716
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
17171717
github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
@@ -1782,10 +1782,13 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
17821782
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
17831783
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
17841784
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
1785-
github.com/golang-jwt/jwt/v4 v4.5.1 h1:JdqV9zKUdtaa9gdPlywC3aeoEsR681PlKC+4F5gQgeo=
1786-
github.com/golang-jwt/jwt/v4 v4.5.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
1787-
github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk=
1788-
github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
1785+
github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
1786+
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
1787+
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
1788+
github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI=
1789+
github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
1790+
github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
1791+
github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
17891792
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
17901793
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA=
17911794
github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0=
@@ -2665,8 +2668,8 @@ golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5H
26652668
golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8=
26662669
golang.org/x/oauth2 v0.21.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
26672670
golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
2668-
golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
2669-
golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
2671+
golang.org/x/oauth2 v0.27.0 h1:da9Vo7/tDv5RH/7nZDz1eMGS/q1Vv1N/7FCrBhI9I3M=
2672+
golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
26702673
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
26712674
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
26722675
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

pkg/metricscollector/metricscollectors.go

+9
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ var (
4040
type MetricsCollector interface {
4141
RecordScalerMetric(namespace string, scaledResource string, scaler string, triggerIndex int, metric string, isScaledObject bool, value float64)
4242

43+
DeleteScalerMetrics(namespace string, scaledResource string, isScaledObject bool)
44+
4345
// RecordScalerLatency create a measurement of the latency to external metric
4446
RecordScalerLatency(namespace string, scaledResource string, scaler string, triggerIndex int, metric string, isScaledObject bool, value time.Duration)
4547

@@ -102,6 +104,13 @@ func RecordScalerMetric(namespace string, scaledObject string, scaler string, tr
102104
}
103105
}
104106

107+
// DeleteScalerMetric create a measurement of the external metric used by the HPA
108+
func DeleteScalerMetrics(namespace string, scaledObject string, isScaledObject bool) {
109+
for _, element := range collectors {
110+
element.DeleteScalerMetrics(namespace, scaledObject, isScaledObject)
111+
}
112+
}
113+
105114
// RecordScalerLatency create a measurement of the latency to external metric
106115
func RecordScalerLatency(namespace string, scaledObject string, scaler string, triggerIndex int, metric string, isScaledObject bool, value time.Duration) {
107116
for _, element := range collectors {

pkg/metricscollector/opentelemetry.go

+4
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,10 @@ func (o *OtelMetrics) RecordScalerMetric(namespace string, scaledResource string
258258
otelScalerMetricVals = append(otelScalerMetricVals, otelScalerMetric)
259259
}
260260

261+
func (o *OtelMetrics) DeleteScalerMetrics(string, string, bool) {
262+
// noop for OTel
263+
}
264+
261265
func ScalerMetricsLatencyCallback(_ context.Context, obsrv api.Float64Observer) error {
262266
for _, v := range otelScalerMetricsLatencyVals {
263267
obsrv.Observe(v.val, v.measurementOption)

pkg/metricscollector/prommetrics.go

+8
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,14 @@ func (p *PromMetrics) RecordScalerMetric(namespace string, scaledResource string
188188
scalerMetricsValue.With(getLabels(namespace, scaledResource, scaler, triggerIndex, metric, isScaledObject)).Set(value)
189189
}
190190

191+
// DeleteScalerMetrics deletes the scaler-related metrics so that we don't report stale values when trigger is gone
192+
func (p *PromMetrics) DeleteScalerMetrics(namespace string, scaledResource string, isScaledObject bool) {
193+
scalerMetricsValue.DeletePartialMatch(prometheus.Labels{"namespace": namespace, "scaledObject": scaledResource, "type": getResourceType(isScaledObject)})
194+
scalerActive.DeletePartialMatch(prometheus.Labels{"namespace": namespace, "scaledObject": scaledResource, "type": getResourceType(isScaledObject)})
195+
scalerErrors.DeletePartialMatch(prometheus.Labels{"namespace": namespace, "scaledObject": scaledResource, "type": getResourceType(isScaledObject)})
196+
scalerMetricsLatency.DeletePartialMatch(prometheus.Labels{"namespace": namespace, "scaledObject": scaledResource, "type": getResourceType(isScaledObject)})
197+
}
198+
191199
// RecordScalerLatency create a measurement of the latency to external metric
192200
func (p *PromMetrics) RecordScalerLatency(namespace string, scaledResource string, scaler string, triggerIndex int, metric string, isScaledObject bool, value time.Duration) {
193201
scalerMetricsLatency.With(getLabels(namespace, scaledResource, scaler, triggerIndex, metric, isScaledObject)).Set(value.Seconds())

pkg/scalers/apache_kafka_scaler.go

-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ type apacheKafkaMetadata struct {
7070

7171
// MSK
7272
AWSRegion string `keda:"name=awsRegion, order=triggerMetadata, optional"`
73-
AWSEndpoint string `keda:"name=awsEndpoint, order=triggerMetadata, optional"`
7473
AWSAuthorization awsutils.AuthorizationMetadata
7574

7675
// TLS

0 commit comments

Comments
 (0)