keda
keda copied to clipboard
Keda scale error with optional secrets or configmaps
Report
Keda operator reports
"error": "error resolving secrets for ScaleTarget: error resolving secret name &SecretKeySelector{LocalObjectReference:LocalObjectReference{Name:aws-timestream,},Key:AWS_TIMESTREAM_SECRETKEY,Optional:*true,
when optional secret is defined in scaledjob.yaml but the secret is not provided in the currently created kubernetes environment because its optional.
- name: AWS_TIMESTREAM_SECRETKEY
valueFrom:
secretKeyRef:
name: aws-timestream
key: AWS_TIMESTREAM_SECRETKEY
optional: true
Expected Behavior
The scaler should ignore the missing secret or configmap and scale a job.
Actual Behavior
The scaler searches for the optional secret or configmap and raises an error
Steps to Reproduce the Problem
- Create a Scaled Job with optional configmapKeyRef or secretKeyRef
- Trigger Keda scaler with message
Logs from KEDA operator
"error": "error resolving secrets for ScaleTarget: error resolving secret name &SecretKeySelector{LocalObjectReference:LocalObjectReference{Name:aws-timestream,},Key:AWS_TIMESTREAM_SECRETKEY,Optional:*true,
KEDA Version
2.8.0
Kubernetes Version
1.21
Platform
Any
Scaler Details
Redis Lists
Anything else?
No response