Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Suresh Kumar <sureshkumar.pp@gmail.com>
surki committed Aug 8, 2022
1 parent 319a5b7 commit 0464937
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -52,13 +52,13 @@ To learn more about our roadmap, we recommend reading [this document](ROADMAP.md
- **General:** Use `mili` scale for the returned metrics ([#3135](https://github.com/kedacore/keda/issue/3135))
- **General:** Use more readable timestamps in KEDA Operator logs ([#3066](https://github.com/kedacore/keda/issue/3066))
- **AWS SQS Queue Scaler:** Support for scaling to include in-flight messages. ([#3133](https://github.com/kedacore/keda/issues/3133))
- **CPU/Memory Scaler:** Added support for targeting specific container in a pod ([#1378](https://github.com/kedacore/keda/issues/1378))
- **GCP Stackdriver Scaler:** Added aggregation parameters ([#3008](https://github.com/kedacore/keda/issues/3008))
- **Kafka Scaler:** Handle Sarama errors properly ([#3056](https://github.com/kedacore/keda/issues/3056))
- **Kafka Scaler:** Support of passphrase encrypted PKCS #\8 private key ([3449](https://github.com/kedacore/keda/issues/3449))
- **Prometheus Scaler:** Add ignoreNullValues to return error when prometheus return null in values ([#3065](https://github.com/kedacore/keda/issues/3065))
- **Selenium Grid Scaler:** Edge active sessions not being properly counted ([#2709](https://github.com/kedacore/keda/issues/2709))
- **Selenium Grid Scaler:** Max Sessions implementation issue ([#3061](https://github.com/kedacore/keda/issues/3061))
- **CPU/Memory Scaler:** Added support for targeting specific container in a pod ([#1378](https://github.com/kedacore/keda/issues/1378))

### Fixes

4 changes: 2 additions & 2 deletions pkg/scalers/cpu_memory_scaler.go
Original file line number Diff line number Diff line change
@@ -97,7 +97,7 @@ func (s *cpuMemoryScaler) GetMetricSpecForScaling(context.Context) []v2beta2.Met
var metricSpec v2beta2.MetricSpec

if s.metadata.ContainerName != "" {
containerCpuMemoryMetric := &v2beta2.ContainerResourceMetricSource{
containerCPUMemoryMetric := &v2beta2.ContainerResourceMetricSource{
Name: s.resourceName,
Target: v2beta2.MetricTarget{
Type: s.metadata.Type,
@@ -106,7 +106,7 @@ func (s *cpuMemoryScaler) GetMetricSpecForScaling(context.Context) []v2beta2.Met
},
Container: s.metadata.ContainerName,
}
metricSpec = v2beta2.MetricSpec{ContainerResource: containerCpuMemoryMetric, Type: v2beta2.ContainerResourceMetricSourceType}
metricSpec = v2beta2.MetricSpec{ContainerResource: containerCPUMemoryMetric, Type: v2beta2.ContainerResourceMetricSourceType}
} else {
cpuMemoryMetric := &v2beta2.ResourceMetricSource{
Name: s.resourceName,

0 comments on commit 0464937

Please sign in to comment.