Skip to content

Commit 75ecf01

Browse files
2142647 Update AKS API used to get cluster credentials in AKS tasks (#20649)
* 2142647 Update AKS API used to get cluster credentials in AKS tasks * Package-lock.json updated * 2142647 moved the common code to common liberary and added help URL for 403 error * 2142647 fixed registry issues * 2142647 fixed issue * 2142647 Update AKS API used to get cluster credentials in AKS tasks * fixed pipeline Failure
1 parent f9c922c commit 75ecf01

File tree

110 files changed

+1609
-1823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1609
-1823
lines changed

Tasks/AzureFunctionOnKubernetesV1/_buildConfigs/Node20/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/AzureFunctionOnKubernetesV1/_buildConfigs/Node20/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@types/uuid": "^9.0.0",
2222
"azure-pipelines-task-lib": "^4.11.0",
2323
"agent-base": "^6.0.2",
24-
"azure-pipelines-tasks-azure-arm-rest": "3.246.5",
24+
"azure-pipelines-tasks-azure-arm-rest": "3.250.0",
2525
"azure-pipelines-tasks-docker-common": "^2.242.0",
2626
"azure-pipelines-tasks-kubernetes-common": "^2.235.0",
2727
"azure-pipelines-tool-lib": "^2.0.7",

Tasks/AzureFunctionOnKubernetesV1/package-lock.json

Lines changed: 198 additions & 191 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/AzureFunctionOnKubernetesV1/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@types/uuid": "^9.0.0",
2222
"azure-pipelines-task-lib": "^4.11.0",
2323
"agent-base": "^6.0.2",
24-
"azure-pipelines-tasks-azure-arm-rest": "3.246.5",
24+
"azure-pipelines-tasks-azure-arm-rest": "3.250.0",
2525
"azure-pipelines-tasks-docker-common": "^2.242.0",
2626
"azure-pipelines-tasks-kubernetes-common": "^2.235.0",
2727
"azure-pipelines-tool-lib": "^2.0.7",

Tasks/AzureFunctionOnKubernetesV1/src/clusterconnection.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default class ClusterConnection {
2323

2424
private loadClusterType(connectionType: string): any {
2525
if(connectionType === "Azure Resource Manager") {
26-
return require("./clusters/armkubernetescluster");
26+
return require("azure-pipelines-tasks-azure-arm-rest/aksUtility")
2727
}
2828
else {
2929
return require("./clusters/generickubernetescluster");
@@ -32,9 +32,15 @@ export default class ClusterConnection {
3232

3333
// get kubeconfig file path
3434
private async getKubeConfig(connectionType): Promise<string> {
35-
return this.loadClusterType(connectionType).getKubeConfig().then((config) => {
36-
return config;
37-
});
35+
if (connectionType === "Azure Resource Manager") {
36+
const clusterName : string = tl.getInput("kubernetesCluster", true);
37+
const azureSubscriptionEndpoint : string = tl.getInput("azureSubscriptionEndpoint", true);
38+
const resourceGroup : string = tl.getInput("azureResourceGroup", true);
39+
const useClusterAdmin: boolean = tl.getBoolInput('useClusterAdmin');
40+
return this.loadClusterType(connectionType).getKubeConfig(azureSubscriptionEndpoint, resourceGroup, clusterName, useClusterAdmin)
41+
} else {
42+
return this.loadClusterType(connectionType).getKubeConfig()
43+
}
3844
}
3945

4046
private async initialize(): Promise<void> {

Tasks/AzureFunctionOnKubernetesV1/src/clusters/armkubernetescluster.ts

Lines changed: 0 additions & 26 deletions
This file was deleted.

Tasks/AzureFunctionOnKubernetesV1/task.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"author": "Microsoft Corporation",
1515
"version": {
1616
"Major": 1,
17-
"Minor": 247,
18-
"Patch": 2
17+
"Minor": 250,
18+
"Patch": 0
1919
},
2020
"demands": [],
2121
"groups": [

Tasks/AzureFunctionOnKubernetesV1/task.loc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"author": "Microsoft Corporation",
1515
"version": {
1616
"Major": 1,
17-
"Minor": 247,
18-
"Patch": 2
17+
"Minor": 250,
18+
"Patch": 0
1919
},
2020
"demands": [],
2121
"groups": [

Tasks/HelmDeployV0/_buildConfigs/Node20/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tasks/HelmDeployV0/_buildConfigs/Node20/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@types/uuid": "^8.3.0",
77
"agent-base": "6.0.2",
88
"azure-pipelines-task-lib": "^4.13.0",
9-
"azure-pipelines-tasks-azure-arm-rest": "3.246.5",
9+
"azure-pipelines-tasks-azure-arm-rest": "3.250.0",
1010
"azure-pipelines-tasks-docker-common": "^2.242.0",
1111
"azure-pipelines-tasks-kubernetes-common": "^2.224.1",
1212
"azure-pipelines-tasks-securefiles-common": "^2.207.0",

0 commit comments

Comments
 (0)