Skip to content
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

Enable AAD RBAC #114

Merged
merged 4 commits into from
Aug 26, 2022
Merged

Enable AAD RBAC #114

merged 4 commits into from
Aug 26, 2022

Conversation

TomAugspurger
Copy link
Contributor

@TomAugspurger TomAugspurger commented Jul 28, 2022

Description

Updates the AKS cluster to use AKS-managed Azure AD integration for RBAC.

This probably requires an updated azuerm provider (the latest is 3.15.1) for the azure_rbac_enabled block to work.

Previously we added the kube context to the default kubeconfig. It looks like the kubelogin tool isn't able to target specific clusters, so I've updated the deployment to write to a local file and exported a KUBECONFIG environment variable pointing to it. I think this will affect how you view this cluster in tools like Lens. You might need to manually add that cluster by pointing to the kubeconfig path.

Is also possible that this will fail until we find the right AAD roles needed for the service principal to do everything (some Kubernetes resources aren't accessible with what seem to be the default permissions)

@TomAugspurger
Copy link
Contributor Author

I've (hopefully) granted the right Azure AD permissions to the service principal configured in GitHub secrets for the deployment to succeed. I suspect that that's only on merges to main.

Copy link
Member

@mmcfarland mmcfarland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I deployed the pctest staging stack with this branch and successfully brought up the cluster with RBAC enabled, and connected to it with my client tools.

@mmcfarland mmcfarland merged commit 6d5d273 into main Aug 26, 2022
@mmcfarland mmcfarland deleted the fix/aad-rbac branch August 26, 2022 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants