Thanks for reaching out. The issue with the Azure Container App not having permissions to access the Azure Service Bus Queue for the first 24 hours after deployment is likely due to RBAC role assignment propagation delay. When roles are assigned to a Managed Identity, it can take time for the permissions to become effective, causing the KEDAScalerFailed
error.
To reduce or eliminate this delay:
- Pre-assign Permissions: Assign roles before deploying the Azure Container App Job. This ensures permissions are available earlier.
- Use a User-Assigned Managed Identity (UAMI): Instead of a System-Assigned identity (which resets on deployment), use a User-Assigned identity so the roles persist.
- Verify Role Assignment Before Running the Job.
- Wait for Propagation: Add a loop in your deployment script to check if permissions are active before enabling event-driven scaling.
These steps should help minimize the RBAC propagation delay and ensure the KEDA scaler works immediately after deployment.
Hope this helps. Do let us know if you have any further queries.
If this answers your query, do click Accept Answer and Yes for "Was this answer helpful." And if you have any further questions, let us know