Skip to content

Commit b8dbd29

Browse files
JorTurFerjoelsmith
andauthored
chore: Cherry-pick fixes for KEDA v2.11.1 (#4744) (#4752)
Signed-off-by: Jorge Turrado <[email protected]> Co-authored-by: Joel Smith <[email protected]>
1 parent 62d90e8 commit b8dbd29

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ To learn more about active deprecations, we recommend checking [GitHub Discussio
5757

5858
- **General**: Paused ScaledObject continues working after removing the annotation ([#4733](https://github.com/kedacore/keda/issues/4733))
5959
- **General**: Skip resolving secrets if namespace is restricted ([#4519](https://github.com/kedacore/keda/issues/4519))
60+
- **Prometheus**: Authenticated connections to Prometheus work in non-PodIdenty case ([#4695](https://github.com/kedacore/keda/issues/4695))
6061

6162
### Deprecations
6263

pkg/scalers/prometheus_scaler.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
v2 "k8s.io/api/autoscaling/v2"
1717
"k8s.io/metrics/pkg/apis/external_metrics"
1818

19+
kedav1alpha1 "github.com/kedacore/keda/v2/apis/keda/v1alpha1"
1920
"github.com/kedacore/keda/v2/pkg/scalers/authentication"
2021
"github.com/kedacore/keda/v2/pkg/scalers/azure"
2122
kedautil "github.com/kedacore/keda/v2/pkg/util"
@@ -237,7 +238,7 @@ func parseAuthConfig(config *ScalerConfig, meta *prometheusMetadata) error {
237238
return err
238239
}
239240

240-
if auth != nil && config.PodIdentity.Provider != "" {
241+
if auth != nil && !(config.PodIdentity.Provider == kedav1alpha1.PodIdentityProviderNone || config.PodIdentity.Provider == "") {
241242
return fmt.Errorf("pod identity cannot be enabled with other auth types")
242243
}
243244
meta.prometheusAuth = auth

0 commit comments

Comments
 (0)