Skip to content

Commit

Permalink
Fix AKS errors and warnings (pulumi#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailshilkov authored and lukehoban committed May 24, 2019
1 parent f980f83 commit cfcbf6f
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ package-lock.json
Pulumi.*.yaml
.idea/
*.iml
key.rsa*
11 changes: 6 additions & 5 deletions azure-ts-aks-helm/cluster.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.

import * as azure from "@pulumi/azure";
import * as azuread from "@pulumi/azuread";
import * as pulumi from "@pulumi/pulumi";
import * as k8s from "@pulumi/kubernetes";
import * as config from "./config";

// Create the AD service principal for the K8s cluster.
let adApp = new azure.ad.Application("aks");
let adSp = new azure.ad.ServicePrincipal("aksSp", { applicationId: adApp.applicationId });
let adSpPassword = new azure.ad.ServicePrincipalPassword("aksSpPassword", {
let adApp = new azuread.Application("aks");
let adSp = new azuread.ServicePrincipal("aksSp", { applicationId: adApp.applicationId });
let adSpPassword = new azuread.ServicePrincipalPassword("aksSpPassword", {
servicePrincipalId: adSp.id,
value: config.password,
endDate: "2099-01-01T00:00:00Z",
Expand All @@ -26,9 +27,9 @@ export const k8sCluster = new azure.containerservice.KubernetesCluster("aksClust
dnsPrefix: `${pulumi.getStack()}-kube`,
linuxProfile: {
adminUsername: "aksuser",
sshKeys: [{
sshKey: {
keyData: config.sshPublicKey,
}],
},
},
servicePrincipal: {
clientId: adApp.applicationId,
Expand Down
1 change: 1 addition & 0 deletions azure-ts-aks-helm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"dependencies": {
"@pulumi/azure": "latest",
"@pulumi/azuread": "latest",
"@pulumi/kubernetes": "latest",
"@pulumi/pulumi": "latest"
},
Expand Down
11 changes: 6 additions & 5 deletions azure-ts-aks-mean/cluster.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.

import * as azure from "@pulumi/azure";
import * as azuread from "@pulumi/azuread";
import * as pulumi from "@pulumi/pulumi";
import * as k8s from "@pulumi/kubernetes";
import * as config from "./config";

// Create the AD service principal for the K8s cluster.
let adApp = new azure.ad.Application("aks");
let adSp = new azure.ad.ServicePrincipal("aksSp", { applicationId: adApp.applicationId });
let adSpPassword = new azure.ad.ServicePrincipalPassword("aksSpPassword", {
let adApp = new azuread.Application("aks");
let adSp = new azuread.ServicePrincipal("aksSp", { applicationId: adApp.applicationId });
let adSpPassword = new azuread.ServicePrincipalPassword("aksSpPassword", {
servicePrincipalId: adSp.id,
value: config.password,
endDate: "2099-01-01T00:00:00Z",
Expand All @@ -26,9 +27,9 @@ export const k8sCluster = new azure.containerservice.KubernetesCluster("aksClust
dnsPrefix: `${pulumi.getStack()}-kube`,
linuxProfile: {
adminUsername: "aksuser",
sshKeys: [{
sshKey: {
keyData: config.sshPublicKey,
}],
},
},
servicePrincipal: {
clientId: adApp.applicationId,
Expand Down
1 change: 1 addition & 0 deletions azure-ts-aks-mean/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
},
"dependencies": {
"@pulumi/azure": "latest",
"@pulumi/azuread": "latest",
"@pulumi/kubernetes": "latest",
"@pulumi/pulumi": "latest",
"@types/mongoose": "^5.2.11",
Expand Down
11 changes: 6 additions & 5 deletions azure-ts-aks-multicluster/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright 2016-2018, Pulumi Corporation. All rights reserved.

import * as azure from "@pulumi/azure";
import * as azuread from "@pulumi/azuread";
import * as pulumi from "@pulumi/pulumi";
import * as config from "./config";

Expand All @@ -21,9 +22,9 @@ const aksClusterConfig = [
];

// Create the AD service principal for the K8s cluster.
const adApp = new azure.ad.Application("aks");
const adSp = new azure.ad.ServicePrincipal("aksSp", {applicationId: adApp.applicationId});
const adSpPassword = new azure.ad.ServicePrincipalPassword("aksSpPassword", {
const adApp = new azuread.Application("aks");
const adSp = new azuread.ServicePrincipal("aksSp", {applicationId: adApp.applicationId});
const adSpPassword = new azuread.ServicePrincipalPassword("aksSpPassword", {
servicePrincipalId: adSp.id,
value: config.password,
endDate: "2099-01-01T00:00:00Z",
Expand All @@ -36,9 +37,9 @@ const k8sClusters = aksClusterConfig.map((perClusterConfig, index) => {
resourceGroupName: config.resourceGroup.name,
linuxProfile: {
adminUsername: "aksuser",
sshKeys: [{
sshKey: {
keyData: config.sshPublicKey,
}],
},
},
servicePrincipal: {
clientId: adApp.applicationId,
Expand Down
1 change: 1 addition & 0 deletions azure-ts-aks-multicluster/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
},
"dependencies": {
"@pulumi/azure": "latest",
"@pulumi/azuread": "latest",
"@pulumi/kubernetes": "latest",
"@pulumi/pulumi": "latest"
},
Expand Down

0 comments on commit cfcbf6f

Please sign in to comment.