Azure / Azure/vscode-aks-tools
Authorize GitHub Workflow to publish to ACR and deploy to cluster
- Dominant language
- TypeScript
- Stars
- 65
- Forks
- 78
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 22
Description
The AKS extension allows users to create workflow files that publish images to an ACR and deploy applications to a cluster. There is also a command to 'attach' the ACR to the cluster, giving the kubelet identity `AcrPull` permission on the ACR. However, a few extra pieces need to be set up to authorize the GitHub workflow to run successfully, namely:
- An Entra ID application needs to be created, with federated credentials configured to allow the workflow to use it.
- Secrets (for tenant, Entra ID application and subscription) need to be stored in the GitHub repo.
- Role assignments need to be added for the application's Service Principal, to allow it to publish to the ACR and deploy to the cluster.
Both Automated Deployments and Draft are able to set up this configuration. However, with both these tools, there is very little visibility into what secrets, applications, identities, credentials and role assignments are being created. This is not ideal from a UX perspective (it can feel opaque and magic, without helping users understand what they've done). It is also potentially worrying from a security standpoint, because if you're not even aware of the resources you've created it's impossible to review and clean them up.
In our implementation, we can provide a much more interactive experience, allowing users to select _existing_ applications and service principals, and review their role assignments, federated identity credentials and associated GitHub secrets. Missing secrets, credentials or role assignments can be added, and extraneous ones removed.
Contributor guide
Research direction
Start by reviewing the existing Automated Deployments and Draft flows to find how applications, service principals, federated credentials, GitHub secrets, and role assignments are created. Define the interactive flow around selecting and reviewing existing resources, adding missing configuration, and removing extraneous items; done means users can inspect and manage the full deployment authorization setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, github-actions, kubernetes, typescript
- Domain
- cloud, devops, security, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100