mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-26 14:49:26 +08:00
force flag added
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user