-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADD support for PodIdentityProvider config in azure pipeline trigger #4867
Conversation
Thank you for your contribution! 🙏 We will review your PR as soon as possible.
While you are waiting, make sure to:
Learn more about: |
Hi @toniiiik, |
Hi @JorTurFer thank you sharing this info. Do you have some estimation when it will be ready? |
I plan to prepare all the pending stuff this week, sorry for the terrible huge delay, we have had faced with some blockers in the process but I think that we are ready to it |
Hi |
hi @luck2bhanu, yes azure-workload is only one supprted pod identity provider. Please see linked doc PR. |
This is a very nice feature, is there any ETA? |
Kindly reminder @tomkerkhove : Have you linked the AAD with AzDO? |
No, would you mind dropping me an email please? |
It would be an awesome feature for the next release |
I'll send you an email |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomkerkhove @JorTurFer do you have any update here please?
@tomkerkhove Hi ! |
We're working on it, had to set up new ADO org and project which is in place now and @JorTurFer is actively working on the rest of it |
I'm facing some issues adding the identity to the AzDO directly, I'll try using an AAD group tomorrow |
/run-e2e azure_pipelines_aad_wi |
It seems that the token isn't working properly: 2024-01-03T00:07:40Z ERROR scale_handler error resolving auth params {"type": "ScaledObject", "namespace": "azure-pipelines-test-ns", "name": "azure-pipelines-test-so", "scalerIndex": 0, "error": "error parsing azure Pipelines metadata: agent pool with id `11` not found: the Azure DevOps REST API returned error. urlString: https://dev.azure.com/kedaoss/_apis/distributedtask/pools?poolID=11 status: 401 response: {\"$id\":\"1\",\"innerException\":null,\"message\":\"TF401444: Please sign-in at least once as e0372f7f-a362-47fb-9631-74a5c4ba8bbf\\\\e0372f7f-a362-47fb-9631-74a5c4ba8bbf\\\\48a9fa1b-211e-436f-ae08-0c9651555054 in a web browser to enable access to the service.\",\"typeName\":\"Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server\",\"typeKey\":\"UnauthorizedRequestException\",\"errorCode\":0,\"eventId\":3000}"}
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).buildScalers
/workspace/pkg/scaling/scalers_builder.go:83
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).performGetScalersCache
/workspace/pkg/scaling/scale_handler.go:355
github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).GetScalersCache
/workspace/pkg/scaling/scale_handler.go:280
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).getScaledObjectMetricSpecs
/workspace/controllers/keda/hpa.go:211
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).newHPAForScaledObject
/workspace/controllers/keda/hpa.go:77
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).createAndDeployNewHPA
/workspace/controllers/keda/hpa.go:50
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).ensureHPAForScaledObjectExists
/workspace/controllers/keda/scaledobject_controller.go:442
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).reconcileScaledObject
/workspace/controllers/keda/scaledobject_controller.go:271
github.com/kedacore/keda/v2/controllers/keda.(*ScaledObjectReconciler).Reconcile
/workspace/controllers/keda/scaledobject_controller.go:182
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227 |
In theory, the managed identity is admin of the project (it's memeber of Project Collection Administrators) |
tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accept the suggestions please, they update the info to use new resources
tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go
Outdated
Show resolved
Hide resolved
tests/scalers/azure/azure_pipelines_aad_wi/azure_pipelines_aad_wi_test.go
Outdated
Show resolved
Hide resolved
/run-e2e azure_pipelines_aad_wi |
it looks like tests are failing. I faced same issue when managed identity had no permission to the pool on organisation scope. In fact that requests to obtain ID from name is
and there is no project name included in url. When I compared agent pool permissions on organisation level and project level the permissions were different. After configuring permissions for managed identity on organisation level e2e tests worked without error. |
/run-e2e azure_pipelines_aad_wi Update: You can check the progress here |
/run-e2e azure_pipelines_aad_wi |
What permissions does the msi need? Could you guide me to assign it? |
hmm it looks good I've assign same admin permission for agentpool. I've send you invitation to my ADO org you can check config here https://dev.azure.com/wedocloudsolutions/_settings/agentpools?poolId=12&view=security. There is also tf for AKS deployment https://dev.azure.com/wedocloudsolutions/_git/Keda |
I'v not received any invitation :( |
/run-e2e azure_pipelines_aad_wi |
It has passed! 🥳 |
94d0607
to
97e18a8
Compare
Signed-off-by: anton.lysina <[email protected]>
Signed-off-by: anton.lysina <[email protected]>
/run-e2e azure_pipelines_aad_wi |
Co-authored-by: Zbynek Roubalik <[email protected]> Signed-off-by: toniiiik <[email protected]>
Signed-off-by: anton.lysina <[email protected]>
/run-e2e azure_pipelines_aad_wi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we lost the token refreshing process? Checking the PR it seems that we don't cache the token anymore and it was a nice feature because otherwise we will request 4-6 tokens per minute
Co-authored-by: Zbynek Roubalik <[email protected]> Signed-off-by: toniiiik <[email protected]>
Signed-off-by: anton.lysina <[email protected]>
Signed-off-by: anton.lysina <[email protected]>
token cache added. Last time I implemented cache for credentials but not for token (at this moment we lost "token refreshing"). Now both credentials and token are reused. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
/run-e2e azure_pipelines_aad_wi |
Support of PodIdentityProvider for azure pipelines scaler.
Checklist
(https://github.com/kedacore/governance/blob/main/SCALERS.md)
Fixes #
Relates to #