You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,22 +6,28 @@ I've written my own templates for deploying AKS in [Azure Bicep](https://docs.mi
6
6
7
7
## Azure Prerequisites
8
8
9
-
These pre-requisites are not part of the CI/CD build, because they only have to be done once, but the [Initialize-Azure](./Initialize-Azure.ps1) script is essentially idempotent and re-runnable.
9
+
These pre-requisites are not part of the CI/CD build, because they only have to be done once, but the [`Initialize-Azure`](./Initialize-Azure.ps1) script is essentially idempotent and re-runnable.
10
10
11
11
1. Enable some features in your Azure tenant (some of which are pre-release features as of this writing)
12
-
2. Create a resource group in Azure to deploy to
12
+
2. Create a resource group in Azure to deploy to (currently TWO resource groups, see [Azure Service Operator](#azure-service-operator) below)
13
13
3. Create a service account in Azure for automation
14
14
4. Assign the "owner" role on the resource group to the service account
15
15
5. Create secrets in github for authentication as that service account
16
16
17
17
The first step, enabling features, only has to be done once per subscription. For best practices, the remaining steps should be done once for each cluster, for security purposes. The idea is that the subscription owner runs this script by hand, and then the automated service account is restricted to deploying to this single resource group.
18
18
19
-
See [Initialize-Azure](./Initialize-Azure.ps1)` for details. You might call it like this:
19
+
See [`Initialize-Azure`](./Initialize-Azure.ps1) for details. You might call it like this:
20
20
21
21
```PowerShell
22
22
./Initialize-Azure -BaseName $name
23
23
```
24
24
25
+
### Azure Service Operator
26
+
27
+
I'm testing some things with the [Azure Service Operator](https://github.com/Azure/azure-service-operator), and for right now, this bicep creates a third resource group (i.e. if you create 'rg-poshcode' in Azure, AKS will create 'rg-poshcode-aks' and the bicep needs 'rg-poshcode-aso' to _contain_ the operator). That way it's creating a user assigned identity for the [Azure Service Operator](https://github.com/Azure/azure-service-operator) to use which has `Contributor` access just to the -aso resource group.
28
+
29
+
In order to avoid giving the github service account additional access, I modified the Initialize-Azure PowerShell script instead.
30
+
25
31
## Deploying Infrastructure
26
32
27
33
Each time the IAC templates change, we're going to run New-AzResourceGroupDeployment, but we have a [workflow for that](.github/workflows/deploy.yaml), of course.
0 commit comments