Skip to content

Commit

Permalink
Managed Clusters (AKS): Default to use MSI.
Browse files Browse the repository at this point in the history
  • Loading branch information
ninjarobot committed Aug 6, 2024
1 parent 9e6abf6 commit 862a73b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Release Notes

## 1.9.1
* Managed Clusters (AKS): Support for workload identity, OIDC issuer, image cleaner, and Defender.
* Managed Clusters (AKS): Default to use MSI for the service principal profile to align with CLI and Portal.
* User Assigned Identities: Support for `depends_on`.

## 1.9.0
Expand Down
2 changes: 1 addition & 1 deletion src/Farmer/Builders/Builders.ContainerService.fs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ type AksBuilder() =
NetworkProfile = None
OidcIssuerProfile = None
SecurityProfile = None
ServicePrincipalClientID = ""
ServicePrincipalClientID = "msi"
WindowsProfileAdminUserName = None
}

Expand Down
16 changes: 9 additions & 7 deletions src/Tests/ContainerService.fs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ let tests =

Expect.equal identity "None" "Basic cluster with client ID should have no identity assigned."
}
test "Basic AKS cluster needs SP" {
Expect.throws
(fun _ ->
let myAks = aks { name "aks-cluster" }
let template = arm { add_resource myAks }
template |> Writer.quickWrite "aks-cluster-should-fail")
"Error should be raised if there are no service principal settings."
test "Basic AKS cluster uses MSI" {
let myAks = aks { name "aks-cluster" }
let deployment = arm { add_resource myAks }
let jobj = deployment.Template |> Writer.toJson |> JToken.Parse

Expect.equal
(jobj.SelectToken "resources[?(@.name=='aks-cluster')].properties.servicePrincipalProfile.clientId")
(JValue "msi")
"Defaults to MSI when no service principal is set."
}
test "Simple AKS cluster" {
let myAks = aks {
Expand Down

0 comments on commit 862a73b

Please sign in to comment.