Skip to content

Commit 4a06999

Browse files
committedMar 15, 2023
resolve convos
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
1 parent 9fcbbc9 commit 4a06999

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed
 

‎.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ issues:
108108
linters:
109109
- dupl
110110
# Exclude gci check for //+kubebuilder:scaffold:imports comments. Waiting to
111-
# resolve https://github.com/kedacore/keda/issues/4379 (#4379)
111+
# resolve https://github.com/kedacore/keda/issues/4379
112112
- path: cmd/operator/main.go
113113
linters:
114114
- gci

‎CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio
4242
- [v1.0.0](#v100)
4343

4444
## Unreleased
45-
- **cpu/mem scaler**: Add option to scale to zero with cpu/mem scaler([#4269](https://github.com/kedacore/keda/issues/4269))
45+
4646
### New
4747

48+
- **CPU/Memory scaler**: Add support for scale to zero if there are multiple triggers([#4269](https://github.com/kedacore/keda/issues/4269))
4849
- TODO ([#XXX](https://github.com/kedacore/keda/issue/XXX))
4950

5051
### Improvements

‎apis/keda/v1alpha1/scaledobject_webhook.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ func verifyHpas(incomingSo *ScaledObject, action string) error {
141141
return nil
142142
}
143143

144-
// TODO
145144
func verifyScaledObjects(incomingSo *ScaledObject, action string) error {
146145
soList := &ScaledObjectList{}
147146
opt := &client.ListOptions{
@@ -255,7 +254,7 @@ func verifyCPUMemoryScalers(incomingSo *ScaledObject, action string) error {
255254
}
256255

257256
if (scaleToZeroErr && incomingSo.Spec.MinReplicaCount == nil) || (scaleToZeroErr && *incomingSo.Spec.MinReplicaCount == 0) {
258-
err := fmt.Errorf("scaledobject has no external triggers AND minReplica is 0 (it can never scale down to 0)")
257+
err := fmt.Errorf("scaledobject has only cpu/memory triggers AND minReplica is 0 (scale to zero doesn't work in this case)")
259258
scaledobjectlog.Error(err, "validation error")
260259
prommetrics.RecordScaledObjectValidatingErrors(incomingSo.Namespace, action, "scale-to-zero-requirements-not-met")
261260
return err

‎pkg/scaling/scale_handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ func (h *scaleHandler) getScaledObjectState(ctx context.Context, scaledObject *k
566566
}
567567

568568
for _, spec := range metricSpecs {
569-
// if cpu/memory resource scaler has minReplicas==0 & atleast one external
569+
// if cpu/memory resource scaler has minReplicas==0 & at least one external
570570
// trigger exists -> object can be scaled to zero
571571
//
572572
if spec.External == nil {

0 commit comments

Comments
 (0)