UPGRADE FAILED: could not get information about the resource: scaledobjects.keda.sh

Brijesh Shah 21 Reputation points

Hi Team,

I am facing an issue with deployment of my KEDA scaleobject through release management pipeline. everything is working if I do manual deployment.

Ofcourse the difference is between the account I use for my Manual deployment (Admin) vs through release pipeline (Service Account).

I deploy both with the same command and command argument. but One works without any issue while other gives following error.

Error: UPGRADE FAILED: could not get information about the resource: scaledobjects.keda.sh "myfunction-scaledobject" is forbidden: User "6cxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxd8" cannot get resource "scaledobjects" in API group "keda.sh" in the namespace "my-function"

I have followed the documentation from https://learn.microsoft.com/en-us/azure/azure-monitor/containers/integrate-keda to install and configuration for KEDA in my AKS cluster with workload identity and that is working correctly when I send service bus message. It scale and process the message through function app.

All is working and getting updated through Helm but not through pipeline.

The Release pipeline follows with following HELM Commands:

kubelogin convert-kubeconfig -l spn --client-id *** --client-secret *** --tenant-id c5xxxxxx-xxxx-xxxx-xxxxxxxxxx8a

helm upgrade --namespace myfunction --install --set image.tag=664 --wait myfunction-processor-release helmchart

the last command gives that error I posted above. In case someone like to see my scaledobject yaml file. here is that.

apiVersion: keda.sh/v1alpha1
kind: ScaledObject
  name: myfunction-scaledobject
  namespace: myfunction
    name: myfunction-deployment
  minReplicaCount: 0
  maxReplicaCount: 1
  - type: azure-servicebus
      namespace: myfunction
      topicName: testtopic
      subscriptionName: Processor
        name: myfunction-processor-auth
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
37,615 questions
{count} votes