Skip to content

Commit

Permalink
pulumi.azure changed the AKS API (pulumi#487)
Browse files Browse the repository at this point in the history
Without this change, the AKS cluster will always try and recreate
  • Loading branch information
stack72 committed Nov 28, 2019
1 parent 1a7f1e6 commit b86dc22
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 31 deletions.
2 changes: 1 addition & 1 deletion azure-cs-aks/Azure.AKS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Pulumi.Azure" Version="1.4.0-preview" />
<PackageReference Include="Pulumi.Azure" Version="1.5.0-preview" />
<PackageReference Include="Pulumi.Azuread" Version="1.1.0-preview" />
<PackageReference Include="Pulumi.Random" Version="1.2.0-preview" />
<PackageReference Include="Pulumi.Tls" Version="1.1.0-preview" />
Expand Down
16 changes: 6 additions & 10 deletions azure-cs-aks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,13 @@ static Task<int> Main()
var cluster = new KubernetesCluster("aksCluster", new KubernetesClusterArgs
{
ResourceGroupName = resourceGroup.Name,
AgentPoolProfiles =
DefaultNodePool = new KubernetesClusterDefaultNodePoolArgs
{
new KubernetesClusterAgentPoolProfilesArgs
{
Name = "aksagentpool",
Count = 3,
VmSize = "Standard_B2s",
OsType = "Linux",
OsDiskSizeGb = 30,
VnetSubnetId = subnet.Id,
}
Name = "aksagentpool",
NodeCount = 3,
VmSize = "Standard_B2s",
OsDiskSizeGb = 30,
VnetSubnetId = subnet.Id,
},
DnsPrefix = "sampleaks",
LinuxProfile = new KubernetesClusterLinuxProfileArgs
Expand Down
6 changes: 3 additions & 3 deletions azure-py-aks-multicluster/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
"client_secret": ad_sp_password.value
},
location=config["location"],
agent_pool_profiles=[{
default_node_pool={
"name": "aksagentpool",
"count": config["node_count"],
"node_count": config["node_count"],
"vm_size": config["node_size"],
}],
},
dns_prefix="sample-kube",
)
cluster_names.append(cluster.name)
Expand Down
12 changes: 5 additions & 7 deletions azure-py-aks/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@
dns_prefix="dns",
linux_profile={"adminUsername": "aksuser", "ssh_key": {"keyData": SSHKEY}},
service_principal={"client_id": app.application_id, "client_secret": sppwd.value},
agent_pool_profiles=[
{
"name": "type1",
"count": 2,
"vmSize": "Standard_B2ms",
}
],
default_node_pool={
"name": "type1",
"node_count": 2,
"vm_size": "Standard_B2ms",
},
)

k8s_provider = Provider(
Expand Down
6 changes: 3 additions & 3 deletions azure-ts-aks-helm/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const adSpPassword = new azuread.ServicePrincipalPassword("aksSpPassword", {
export const k8sCluster = new azure.containerservice.KubernetesCluster("aksCluster", {
resourceGroupName: config.resourceGroup.name,
location: config.location,
agentPoolProfiles: [{
defaultNodePool: {
name: "aksagentpool",
count: config.nodeCount,
nodeCount: config.nodeCount,
vmSize: config.nodeSize,
}],
},
dnsPrefix: `${pulumi.getStack()}-kube`,
linuxProfile: {
adminUsername: "aksuser",
Expand Down
7 changes: 3 additions & 4 deletions azure-ts-aks-keda/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ export class AksCluster extends pulumi.ComponentResource {
// Now allocate an AKS cluster.
this.cluster = new azure.containerservice.KubernetesCluster("aksCluster", {
resourceGroupName: args.resourceGroupName,
agentPoolProfiles: [{
defaultNodePool: {
name: "aksagentpool",
count: args.vmCount,
nodeCount: args.vmCount,
vmSize: args.vmSize,
osType: "Linux",
osDiskSizeGb: 30,
vnetSubnetId: subnet.id,
}],
},
dnsPrefix: name,
linuxProfile: {
adminUsername: "aksuser",
Expand Down
6 changes: 3 additions & 3 deletions azure-ts-aks-mean/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ const adSpPassword = new azuread.ServicePrincipalPassword("aksSpPassword", {
export const k8sCluster = new azure.containerservice.KubernetesCluster("aksCluster", {
resourceGroupName: config.resourceGroup.name,
location: config.location,
agentPoolProfiles: [{
defaultNodePool: {
name: "aksagentpool",
count: config.nodeCount,
nodeCount: config.nodeCount,
vmSize: config.nodeSize,
}],
},
dnsPrefix: `${pulumi.getStack()}-kube`,
linuxProfile: {
adminUsername: "aksuser",
Expand Down

0 comments on commit b86dc22

Please sign in to comment.