我在通过发布管理管道部署 KEDA 规模对象时遇到问题。如果我进行手动部署,一切都会正常工作。
当然,区别在于我用于手动部署的帐户(管理员)与通过发布管道(服务帐户)的帐户之间的区别。
我使用相同的命令和命令参数来部署两者。但其中一个可以正常工作,而其他则出现以下错误。
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"
我已按照 https://learn.microsoft.com/en-us/azure/azure-monitor/containers/integrate-keda 中的文档使用工作负载身份在我的 AKS 集群中安装和配置 KEDA,即当我发送服务总线消息时工作正常。它通过功能应用程序缩放和处理消息。
一切都在通过 Helm 运行并更新,但不是通过管道。
发布管道遵循以下 HELM 命令:
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
最后一个命令给出了我上面发布的错误。如果有人喜欢查看我的scaledobject yaml 文件。就是这样。
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: myfunction-scaledobject
namespace: myfunction
spec:
scaleTargetRef:
name: myfunction-deployment
minReplicaCount: 0
maxReplicaCount: 1
triggers:
- type: azure-servicebus
metadata:
namespace: myfunction
topicName: testtopic
subscriptionName: Processor
authenticationRef:
name: myfunction-processor-auth
嘿我想在这里帮助你! 您可以寻求专业人士的帮助或使用聊天gpt来解决您的疑问