force flag added

This commit is contained in:
tauhid621
2020-06-16 22:15:55 +05:30
parent f1898e0618
commit 6773ba4167
27 changed files with 95 additions and 17 deletions
+9 -2
View File
@@ -20,8 +20,15 @@ export class Kubectl {
}
}
public apply(configurationPaths: string | string[]) {
return this.execute(['apply', '-f', this.createInlineArray(configurationPaths)]);
public apply(configurationPaths: string | string[], force?: boolean) {
let applyArgs: string[] = ['apply', '-f', this.createInlineArray(configurationPaths)];
if (!!force) {
console.log("force flag is on, deployment will continue even if previous deployment already exists");
applyArgs.push('--force');
}
return this.execute(applyArgs);
}
public describe(resourceType: string, resourceName: string, silent?: boolean) {