Skip to content

Commit f7a9998

Browse files
authored
Merge branch 'main' into main
Signed-off-by: rickbrouwer <[email protected]>
2 parents e35aa0c + c4a8651 commit f7a9998

18 files changed

+228
-40
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
44
#-------------------------------------------------------------------------------------------------------------
55

6-
FROM golang:1.23.6
6+
FROM golang:1.23.7
77

88
# Avoid warnings by switching to noninteractive
99
ENV DEBIAN_FRONTEND=noninteractive

.github/workflows/fossa.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
24-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
24+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
2525
with:
2626
go-version: "1.23"
2727
- run: go version

.github/workflows/main-build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**
1717

1818
# keda-tools is built from github.com/test-tools/tools/Dockerfile
19-
container: ghcr.io/kedacore/keda-tools:1.23.6
19+
container: ghcr.io/kedacore/keda-tools:1.23.7
2020
steps:
2121
- name: Check out code
2222
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -32,13 +32,13 @@ jobs:
3232
echo "build_cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
3333
3434
- name: Go modules cache
35-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
35+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
3636
with:
3737
path: ${{ steps.go-paths.outputs.mod_cache }}
3838
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
3939

4040
- name: Go build cache
41-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
41+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4242
with:
4343
path: ${{ steps.go-paths.outputs.build_cache }}
4444
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}

.github/workflows/pr-e2e.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
triage:
1111
runs-on: ubuntu-latest
1212
name: Comment evaluate
13-
container: ghcr.io/kedacore/keda-tools:1.23.6
13+
container: ghcr.io/kedacore/keda-tools:1.23.7
1414
outputs:
1515
run-e2e: ${{ startsWith(github.event.comment.body,'/run-e2e') && steps.checkUserMember.outputs.isTeamMember == 'true' }}
1616
pr_num: ${{ steps.parser.outputs.pr_num }}
@@ -69,7 +69,7 @@ jobs:
6969
needs: triage
7070
runs-on: ubuntu-latest
7171
name: Build images
72-
container: ghcr.io/kedacore/keda-tools:1.23.6
72+
container: ghcr.io/kedacore/keda-tools:1.23.7
7373
if: needs.triage.outputs.run-e2e == 'true'
7474
steps:
7575
- name: Set status in-progress
@@ -149,7 +149,7 @@ jobs:
149149
needs: [triage, build-test-images]
150150
runs-on: e2e
151151
name: Execute e2e tests
152-
container: ghcr.io/kedacore/keda-tools:1.23.6
152+
container: ghcr.io/kedacore/keda-tools:1.23.7
153153
if: needs.triage.outputs.run-e2e == 'true'
154154
steps:
155155
- name: Set status in-progress
@@ -255,7 +255,7 @@ jobs:
255255
details_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
256256

257257
- name: Upload test logs
258-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
258+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
259259
with:
260260
name: e2e-test-logs
261261
path: "${{ github.workspace }}/**/*.log"

.github/workflows/pr-validation.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
validate:
1111
name: validate - ${{ matrix.name }}
1212
runs-on: ${{ matrix.runner }}
13-
container: ghcr.io/kedacore/keda-tools:1.23.6
13+
container: ghcr.io/kedacore/keda-tools:1.23.7
1414
strategy:
1515
matrix:
1616
include:
@@ -42,13 +42,13 @@ jobs:
4242
echo "build_cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
4343
4444
- name: Go modules cache
45-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
45+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4646
with:
4747
path: ${{ steps.go-paths.outputs.mod_cache }}
4848
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
4949

5050
- name: Go build cache
51-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
51+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
5252
with:
5353
path: ${{ steps.go-paths.outputs.build_cache }}
5454
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
@@ -80,7 +80,7 @@ jobs:
8080
pull-requests: read # for dorny/paths-filter to read pull requests
8181
name: validate-dockerfiles - ${{ matrix.name }}
8282
runs-on: ${{ matrix.runner }}
83-
container: ghcr.io/kedacore/keda-tools:1.23.6
83+
container: ghcr.io/kedacore/keda-tools:1.23.7
8484
strategy:
8585
matrix:
8686
include:
@@ -114,7 +114,7 @@ jobs:
114114
pull-requests: read # for dorny/paths-filter to read pull requests
115115
name: Validate dev-container - ${{ matrix.name }}
116116
runs-on: ${{ matrix.runner }}
117-
container: ghcr.io/kedacore/keda-tools:1.23.6
117+
container: ghcr.io/kedacore/keda-tools:1.23.7
118118
strategy:
119119
matrix:
120120
include:
@@ -144,10 +144,10 @@ jobs:
144144
runs-on: ubuntu-latest
145145
steps:
146146
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
147-
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
147+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
148148
with:
149149
python-version: 3.x
150-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
150+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
151151
with:
152152
go-version: "1.23"
153153
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

.github/workflows/release-build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**
1818

1919
# keda-tools is built from github.com/test-tools/tools/Dockerfile
20-
container: ghcr.io/kedacore/keda-tools:1.23.6
20+
container: ghcr.io/kedacore/keda-tools:1.23.7
2121
steps:
2222
- name: Check out code
2323
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -33,13 +33,13 @@ jobs:
3333
echo "build_cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
3434
3535
- name: Go modules cache
36-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
36+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
3737
with:
3838
path: ${{ steps.go-paths.outputs.mod_cache }}
3939
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
4040

4141
- name: Go build cache
42-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
42+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
4343
with:
4444
path: ${{ steps.go-paths.outputs.build_cache }}
4545
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}

.github/workflows/scorecards.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
5656
# format to the repository Actions tab.
5757
- name: "Upload artifact"
58-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.pre.node20
58+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.pre.node20
5959
with:
6060
name: SARIF file
6161
path: results.sarif

.github/workflows/static-analysis-codeql.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
codeQl:
1818
name: Analyze CodeQL Go
1919
runs-on: ubuntu-latest
20-
container: ghcr.io/kedacore/keda-tools:1.23.6
20+
container: ghcr.io/kedacore/keda-tools:1.23.7
2121
if: (github.actor != 'dependabot[bot]')
2222
steps:
2323
- name: Checkout repository

.github/workflows/template-main-e2e-test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Run e2e test
99
runs-on: ARM64
1010
# keda-tools is built from github.com/test-tools/tools/Dockerfile
11-
container: ghcr.io/kedacore/keda-tools:1.23.6
11+
container: ghcr.io/kedacore/keda-tools:1.23.7
1212
concurrency: e2e-tests
1313
steps:
1414
- name: Check out code
@@ -47,7 +47,7 @@ jobs:
4747
NODE_POOL_SIZE: 1
4848

4949
- name: Upload test logs
50-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
50+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
5151
if: ${{ always() }}
5252
with:
5353
name: e2e-test-logs

.github/workflows/template-smoke-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ${{ inputs.runs-on }}
2020
steps:
2121
- name: Setup Go
22-
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
22+
uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
2323
with:
2424
go-version: "1.23"
2525

@@ -45,7 +45,7 @@ jobs:
4545
run: make smoke-test
4646

4747
- name: Upload test logs
48-
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4
48+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
4949
if: ${{ always() }}
5050
with:
5151
name: smoke-test-logs ${{ inputs.runs-on }}-${{ inputs.kubernetesVersion }}

.github/workflows/v1-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fetch-depth: 1
2020

2121
- name: Go modules cache
22-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
22+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
2323
with:
2424
path: /go/pkg
2525
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,10 @@ Here is an overview of all new **experimental** features:
9797
- **General**: Fix CVE-2025-29786 ([#6637](https://github.com/kedacore/keda/issues/6637))
9898
- **General**: Fix CVE-2025-30204 ([#6641](https://github.com/kedacore/keda/pull/6641))
9999
- **General**: Fix event text when deactivation fails ([#6469](https://github.com/kedacore/keda/issues/6469))
100+
- **General**: Fix fallback validation check bug ([#6407](https://github.com/kedacore/keda/pull/6407))
100101
- **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))
101102
- **General**: Paused ScaledObject count is reported correctly after operator restart ([#6321](https://github.com/kedacore/keda/issues/6321))
103+
- **General**: Reiterate fix (after [#6407](https://github.com/kedacore/keda/pull/6407)) for fallback validation in admission webhook. ([#6538](https://github.com/kedacore/keda/pull/6538))
102104
- **General**: ScaledJobs ready status set to true when recoverred problem ([#6329](https://github.com/kedacore/keda/pull/6329))
103105
- **AWS Scalers**: Add AWS region to the AWS Config Cache key ([#6128](https://github.com/kedacore/keda/issues/6128))
104106
- **External Scaler**: Support server TLS without custom CA ([#6606](https://github.com/kedacore/keda/pull/6606))

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM --platform=$BUILDPLATFORM ghcr.io/kedacore/keda-tools:1.23.6 AS builder
2+
FROM --platform=$BUILDPLATFORM ghcr.io/kedacore/keda-tools:1.23.7 AS builder
33

44
ARG BUILD_VERSION=main
55
ARG GIT_COMMIT=HEAD

Dockerfile.adapter

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the adapter binary
2-
FROM --platform=$BUILDPLATFORM ghcr.io/kedacore/keda-tools:1.23.6 AS builder
2+
FROM --platform=$BUILDPLATFORM ghcr.io/kedacore/keda-tools:1.23.7 AS builder
33

44
ARG BUILD_VERSION=main
55
ARG GIT_COMMIT=HEAD

Dockerfile.webhooks

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM --platform=$BUILDPLATFORM ghcr.io/kedacore/keda-tools:1.23.6 AS builder
2+
FROM --platform=$BUILDPLATFORM ghcr.io/kedacore/keda-tools:1.23.7 AS builder
33

44
ARG BUILD_VERSION=main
55
ARG GIT_COMMIT=HEAD

apis/keda/v1alpha1/scaledobject_types.go

+18-8
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,8 @@ import (
2323

2424
autoscalingv2 "k8s.io/api/autoscaling/v2"
2525
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
26-
logf "sigs.k8s.io/controller-runtime/pkg/log"
2726
)
2827

29-
var scaledobjecttypeslog = logf.Log.WithName("scaledobject-types")
30-
3128
// +genclient
3229
// +kubebuilder:object:root=true
3330
// +kubebuilder:subresource:status
@@ -297,12 +294,25 @@ func CheckFallbackValid(scaledObject *ScaledObject) error {
297294
scaledObject.Spec.Fallback.FailureThreshold, scaledObject.Spec.Fallback.Replicas)
298295
}
299296

300-
for _, trigger := range scaledObject.Spec.Triggers {
301-
if trigger.Type == cpuString || trigger.Type == memoryString {
302-
scaledobjecttypeslog.Error(nil, fmt.Sprintf("type is %s , but fallback it is not supported by the CPU & memory scalers", trigger.Type))
297+
if scaledObject.IsUsingModifiers() {
298+
if scaledObject.Spec.Advanced.ScalingModifiers.MetricType != autoscalingv2.AverageValueMetricType {
299+
return fmt.Errorf("when using ScalingModifiers, ScaledObject.Spec.Advanced.ScalingModifiers.MetricType must be AverageValue to have fallback enabled")
300+
}
301+
} else {
302+
fallbackValid := false
303+
for _, trigger := range scaledObject.Spec.Triggers {
304+
if trigger.Type == cpuString || trigger.Type == memoryString {
305+
continue
306+
}
307+
// If at least one trigger is of the type `AverageValue`, then having fallback is valid.
308+
if trigger.MetricType == autoscalingv2.AverageValueMetricType {
309+
fallbackValid = true
310+
break
311+
}
303312
}
304-
if trigger.MetricType != autoscalingv2.AverageValueMetricType {
305-
return fmt.Errorf("MetricType=%s, but fallback can only be enabled for triggers with metric of type AverageValue", trigger.MetricType)
313+
314+
if !fallbackValid {
315+
return fmt.Errorf("at least one trigger (that is not cpu or memory) has to have the `AverageValue` type for the fallback to be enabled")
306316
}
307317
}
308318
return nil

0 commit comments

Comments
 (0)