I'm attempting to set up KEDA with azure storage queues for experimentation purposes. I want to use the connection string for the storage account for authentication purposes but the KEDA operator is unable to parse the connection string. The ScaledObject is created and its status is "Ready" but is unable to get information on queue length or talk to the queues at all. I have created an Opaque secret and referenced it using the authenticationRef section as described in the documentation.
The error I see in the logs is:
ERROR azure_queue_scaler error) {"error": "can't parse storage connection string. Missing key or name"}
I have carefully followed the documentation and looked at the KEDA source code but I'm still puzzled.
This is my secret definition:
kind: Secret
metadata:
name: azure-st-conn-string-secret
type: Opaque
data:
connectionString: MY_BASE_64_ENCODED_CONNECTION_STRING
And my TriggerAuth and ScaledObjects:
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: azure-queue-auth
spec:
secretTargetRef:
- parameter: connection
name: azure-st-conn-string-secret
key: connectionString
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: azure-queue-scaledobject
spec:
scaleTargetRef:
name: my-deployment-target
triggers:
- type: azure-queue
metadata:
queueLength: '5'
queueName: my-queue-name
authenticationRef:
name: azure-queue-auth
Having gone through the KEDA source code, this error would be thrown if the connection string is not in the right format. However, I verified that the secret, as created in the cluster, conforms exactly to what the source code expects, i.e:
DefaultEndpointsProtocol=https;AccountName=THE_ACCOUNT_NAME;AccountKey=THE_ACCOUNT_KEY;EndpointSuffix=core.windows.net
What am I doing wrong?