Repository navigation
Conversation
…paces Creates a namespace with ResourceQuota, LimitRange and Entra group role bindings on an existing AKS cluster. The block authenticates through the backplane UAMI by workload identity federation and holds no kubeconfig. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…namespace block The connector no longer targets a meshStack tenant. It reads its namespace from the namespace_name output of the Azure AKS Namespace building block it is ordered under, so aks.namespace_definition_uuid is a new required input. Drops the empty main.tf and outputs.tf stubs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ojects and tenants The starter kit no longer creates meshStack projects, tenants or the creator's project binding. It orders one Azure AKS Namespace building block per stage and wires a GitHub Actions connector to each, all at workspace level. platform_ref, landing_zone_refs, project_tags and the creator input are gone; building_block_definition_version_refs now also needs an aks-namespace entry, and namespace_group_object_ids controls who gets access. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ace building blocks only Drops the meshStack project, tenant, platform and landing zone from the architecture and its diagram. The starterkit now orders azure/aks-namespace and aks/github-connector blocks directly in the workspace. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Scorecard Check
📊 meshstack-hub Module Scorecard
📋 Per-Module Category SummaryScore per category per building block.
Core Structure — ✅ all passingBasic module file structure and documentation — applies to 3 modules
Core Structure — Summary
Integration — ✅ all passingmeshstack_integration.tf conventions — applies to 3 modules
Integration — Summary
AWS Backplane — not applicableAWS automation principal conventions (WIF or cross-account StackSet) — applies to 0 modules No applicable modules. Azure Backplane — ✅ all passingAzure UAMI-based automation principal conventions — applies to 1 modules
Azure Backplane — Summary
GCP Backplane — not applicableGCP workload-identity-federation automation principal conventions — applies to 0 modules No applicable modules. STACKIT Backplane — not applicableSTACKIT WIF-based automation principal conventions — applies to 0 modules No applicable modules. Testing — some checks failingEnd-to-end test coverage — applies to 3 modules
Testing — Summary
📈 Overall SummaryOverall Average Score: 94%Score Distribution
|
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
…ll them from workspace members The block creates an admin, edit and view security group per namespace, looks up the workspace members it receives through USER_PERMISSIONS, adds each to the group their workspace role maps to, and binds the groups to the matching cluster roles. Existing group IDs can still be bound alongside. The backplane gains Graph User.Read.All and Group.ReadWrite.All. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e the quota static Drops the admin, edit and view group object ID inputs from the namespace block and the starterkit's namespace_group_object_ids that fed them. The resource quota becomes a static, platform-set input instead of a user input. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary
Rebuilds the
azure-kubernetesreference architecture on workspace-level building blocks only. No meshStack project, tenant, platform or landing zone remains. A Kubernetes namespace is now a building block, not a tenant.This needs a new workspace building block for namespaces, so the PR adds
azure/aks-namespaceand reworksaks/github-connectorandaks/starterkitaround it.Breaking: three commits are
feat!. Existing starterkit and connector deployments must be re-wired (see Migration).Commits
feat(azure/aks-namespace)meshstack_integration.tf, e2efeat(aks/github-connector)!feat(aks/starterkit)!feat(azure/aks-namespace)(2nd)feat(azure-kubernetes)!azure/aks-namespace(new)Backplane (follows
azure-backplane.md, scorecard 100%):workload_identity_federation. No secrets.managedClusters/read,listClusterUserCredential/action) at the cluster.Azure Kubernetes Service RBAC Cluster Adminat the cluster. Namespace creation is a cluster-scoped write, so this is the narrowest built-in role that works.acr_id: grantsAcrPullto the cluster's kubelet identity (lifecycle.enabled, notcount).Building block:
kubernetes_namespace_v1,resource_quota_v1,limit_range_v1, and onerole_binding_v1per Entra group foradmin,editandview.namespace_name,cluster_name,cluster_resource_group_name,summary.Cluster auth.
provider.tfexchanges the runner's federated OIDC token for an Entra token (audience6dae42f8-4368-4678-94ff-3960e28e3630) with thehttpprovider, then hands it to thekubernetesprovider. This is whatkubelogin get-token --login workloadidentitydoes. I did it in HCL because the repo's pre-run convention wants tools from a Nix flake, and I couldn't generate aflake.lockhere.Entra groups and users (added after the first review pass)
The block now owns user-to-group assignment, not just role bindings:
admin,edit,view), named[prefix.]<workspace>.<namespace>.<role>.USER_PERMISSIONSinput, resolves them in Entra in oneazuread_userslookup (ignore_missing, matched on email or UPN), and adds each to the group their workspace role maps to. Unresolved members are reported in theunresolved_usersoutput and the summary and never fail the run.role_mapping(static input, default Owner/Manager to admin, Member to edit, Reader to view) maps workspace roles to namespace roles. A role missing from the map gets no access.resource_quotainmeshstack_integration.tf), not something the ordering team picks.User.Read.AllandGroup.ReadWrite.Allapp roles, which need admin consent.for_eachkey.I exercised the group and binding logic with a throwaway mocked
tofu test(2 members resolved, 1 unresolved, 4 bindings; and the no-users case). I deleted it afterwards because repo policy only allows tests undere2e/.aks/github-connectortarget_typeis nowWORKSPACE_LEVEL, with nosupported_platformsand noTENANT_*permissions.namespaceis aBUILDING_BLOCK_OUTPUTof the namespace definition'snamespace_name, replacingPLATFORM_TENANT_ID.aks.namespace_definition_uuidis a new required input, and the namespace definition is added todependency_refs.main.tfandoutputs.tfstubs (both only contained a TODO).config.tfadmin-certificate stub from the backplane.aks/starterkitmeshstack_project,meshstack_project_user_binding,meshstack_tenantand allmovedblocks.meshstack_building_block.namespaceper stage (for_each), and connectors now take[repo, namespace[stage]]as parents. Every child block keeps the run-status postcondition.platform_ref,landing_zone_refs,project_tags,creator.building_block_definition_version_refsneeds an extraaks-namespacekey.BUILDINGBLOCK_*.Reference architecture
README, front-matter (
azure/aks-namespaceadded tobuildingBlocks), "How it works", deployment order and shared-responsibility table are rewritten..dotedited and.svgre-rendered withtools/diagrams/render-diagrams.mjs.Migration
For existing deployments:
azure/aks-namespace(cluster must have Azure RBAC for Kubernetes enabled).aks/github-connectorwithaks.namespace_definition_uuid.aks/starterkit: drop the removed variables and addaks-namespacetobuilding_block_definition_version_refs.Verification
tofu validate: namespace building block, its backplane, starterkit building blockazure/aks-namespace: 100%ci/validate_modules.shfails locally only becausepngquantisn't installedaks/github-connectorandaks/starterkitstill lack e2e and backplane scorecard items, as before this PRaks-namespaceis written but unexecuted. Per the e2e skill, please dispatch a run and link it here before merge.Please review closely
Unverified:
USER_PERMISSIONSat workspace level.azure/entra-id-groupsuses it on a project-level definition. Neither the provider docs nor its source say what it delivers to aWORKSPACE_LEVELdefinition. I assumed workspace members with their workspace roles. The role names in the defaultworkspace_role_mapping(Workspace Owner/Manager/Member/Reader) are also from memory and need checking against a real instance. If the input arrives empty, namespaces get their groups but no members.Token in state. The
httptoken exchange stores a bearer token, valid about an hour, in the run's state. Acceptable, or would you rather requirekubeloginvia a Nix flake?azure/aksdoesn't enable Azure RBAC for Kubernetes (azure_rbac_enabled). The namespace block needs it. I documented it as a prerequisite and leftazure/aksalone. Add a variable there in this PR or a follow-up?e2e fixture. The test needs
fixtures.azure.aks(cluster_name,resource_group_name) inmeshstack-smoke-test'stest_context. That repo needs a matching change before the test can run.ACR pull is cluster-wide. The kubelet identity pulls images, so it can't be scoped per namespace.
Diagram. I couldn't view the full rendered SVG (my preview was cropped), so please check the layout, especially the meshStack column.
Website. I didn't build the website, so the new front-matter path
azure/aks-namespaceis unchecked.Connector auth. Moving the connector from the
config.tfcertificate stub to workload identity is out of scope here.🤖 Generated with Claude Code