-
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
Support Azure AD Workload Identity
as an identity pod
#2487
Comments
Azure AD Workload Identity
as a identity podAzure AD Workload Identity
as an identity pod
We currently rely on pod identity and not AD workload identity, but we should support the new approach next to the current one indeed (same auth provider though, but config option + Helm support) |
I am willing to take this up. Have been reading a bit about workload identity, can try to understand what changes are required (if any) and come up with a design. |
That would be great, thanks for coming up with a design! |
In the scalers currently we use Looking at the code here used in the quick-start guide provided by Now, for allowing the user to specify that they want to use podIdentity:
provider: azure-workload As for The first one as the name suggests is the duration in which the service account token expires. I feel that this should be up to the user, so we should have another CLI flag for this (Optional with a default value). The second one is for containers within the pod being given the identity, to allow certain containers within the pod to be skipped from being given the projected service account token volume. As we only have one container within the To summarize the changes required per my understanding -
PS - Key vault currently does not support pod identity, but only active directory credentials. I was thinking I could implement support for both together (once we finalize the design, and I start the implementation). So, what do you guys think? @tomkerkhove @JorTurFer @zroubalik |
Actually, I just realized the Refer this. |
Once the code changes have been done for the Azure scalers.
|
#2907 Draft PR with workload identity enabled for Service Bus, to showcase the code changes. The exact code change will differ from scaler to scaler, but the general idea is to fetch the Tested this with the following definitions, and KEDA is able to fetch the metrics and scale. apiVersion: apps/v1
kind: Deployment
metadata:
name: keda-azwi-sb-deployment
namespace: default
spec:
selector:
matchLabels:
app: keda-azwi-sb
template:
metadata:
labels:
app: keda-azwi-sb
spec:
containers:
- name: nginx
image: nginx:1.16.1
---
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
name: keda-azwi-sb-ta
namespace: default
spec:
podIdentity:
provider: azure-workload
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: keda-azwi-sb-so
namespace: default
labels:
deploymentName: keda-azwi-sb-deployment
spec:
scaleTargetRef:
name: keda-azwi-sb-deployment
pollingInterval: 5
cooldownPeriod: 10
minReplicaCount: 0
maxReplicaCount: 1
triggers:
- type: azure-servicebus
metadata:
namespace: kedaazwisb
queueName: sb-queue
authenticationRef:
name: keda-azwi-sb-ta
--- I had to manually annotate the service accounts and redeploy the operators and metric server for the |
I will have a look next week, thanks! |
@kedacore/keda-maintainers Do we introduce a new provider similar to the above suggestion: podIdentity:
provider: azure-workload Or do we stick with Although the first option follows our current AWS approach which might be ideal:
|
I think that Azure-workload is good enough. As you said, in AWS we already have 2. We don't have a lot of pod identities for being a problem. |
Agreed. I don't think we have to rename it later on though |
Any comments on the I was thinking of the following flags.
When |
I like the above suggestion, thanks for the proposal!
This is the only concern that I have though, if they don't create it then shouldn't we create it? If not, then do you want to assume |
Yes, you are right. We assume that the |
|
@raorugan I'm not sure I get your comment, would you mind elaborating on it please? |
Thanks a ton, this is a major addition - Thank you @v-shenoy! |
Is there any ETA on when this will be available? It's already exposed in the Helm chart, which mislead me into believing it was generally available (shame on me for not checking the release notes before getting excited and trying to use it). |
Soon - https://github.com/kedacore/keda/blob/main/ROADMAP.md#upcoming-release-cycles! We merged the Helm PR too soon, unfortunately, but didn't revert it back so sorry for the confusion. |
Proposal
Azure AD Workload Identity is the next iteration of Azure AD Pod Identity that enables Kubernetes applications to access Azure cloud resources securely with Azure Active Directory based on annotated service accounts.
https://github.com/Azure/azure-workload-identity
Use-Case
This is the new iteration of AAD-Pod-Identity, so this will apply in any case where AAD-Pod-Identity applies now
Anything else?
It's possible that current implementation supports it, but if it's already support it we should update the docs
The text was updated successfully, but these errors were encountered: