Skip to content

Commit

Permalink
Updating kubeconfig mode in k8s manifest task (#13706)
Browse files Browse the repository at this point in the history
* Updating kubeconfig mode in k8s manifest task

* Running auto formatter and updating task version
  • Loading branch information
shigupt202 authored Oct 27, 2020
1 parent 9280a26 commit ef8ef01
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 4 deletions.
27 changes: 27 additions & 0 deletions Tasks/KubernetesManifestV0/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Tasks/KubernetesManifestV0/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"del": "2.2.0",
"js-yaml": "3.6.1",
"moment": "2.21.0",
"typed-rest-client": "1.7.3",
"utility-common-v2": "file:../../_build/Tasks/Common/utility-common-v2-2.0.0.tgz"
}
}
4 changes: 4 additions & 0 deletions Tasks/KubernetesManifestV0/src/actions/bake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ abstract class RenderEngine {

class HelmRenderEngine extends RenderEngine {
public bake = async (): Promise<any> => {
// Helm latest releases require restricted permissions on Kubeconfig
const kubeconfigPath = tl.getVariable('KUBECONFIG');
if (kubeconfigPath != null)
fs.chmodSync(kubeconfigPath, '600');
const helmPath = await helmutility.getHelm();
const helmCommand = new Helm(helmPath, TaskParameters.namespace);
const helmReleaseName = tl.getInput('releaseName', false);
Expand Down
4 changes: 2 additions & 2 deletions Tasks/KubernetesManifestV0/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 175,
"Patch": 1
"Minor": 178,
"Patch": 0
},
"demands": [],
"groups": [],
Expand Down
4 changes: 2 additions & 2 deletions Tasks/KubernetesManifestV0/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 0,
"Minor": 175,
"Patch": 1
"Minor": 178,
"Patch": 0
},
"demands": [],
"groups": [],
Expand Down

0 comments on commit ef8ef01

Please sign in to comment.