mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Converting all SQL MIAA commands to use K8s API commands (#20203)
* refresh does not differentiate direct vs indirect * For direct mode MIAA commands, always use --use-k8s * Changed comment language to use ARM instead of direct and K8S API instead of indirect Co-authored-by: Candice Ye <canye@microsoft.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
import { ControllerInfo, ResourceType } from 'arc';
|
import { ControllerInfo, ResourceType } from 'arc';
|
||||||
import * as azExt from 'az-ext';
|
import * as azExt from 'az-ext';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { ConnectionMode } from '../constants';
|
|
||||||
import * as loc from '../localizedConstants';
|
import * as loc from '../localizedConstants';
|
||||||
import { AzureArcTreeDataProvider } from '../ui/tree/azureArcTreeDataProvider';
|
import { AzureArcTreeDataProvider } from '../ui/tree/azureArcTreeDataProvider';
|
||||||
|
|
||||||
@@ -69,15 +68,6 @@ export class ControllerModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async refresh(showErrors: boolean = true, namespace: string): Promise<void> {
|
public async refresh(showErrors: boolean = true, namespace: string): Promise<void> {
|
||||||
await this.refreshController(showErrors, namespace);
|
|
||||||
if (this._controllerConfig?.spec.settings.azure.connectionMode.toLowerCase() === ConnectionMode.direct) {
|
|
||||||
await this.refreshDirectMode(this._controllerConfig?.spec.settings.azure.resourceGroup, namespace);
|
|
||||||
} else {
|
|
||||||
await this.refreshIndirectMode(namespace);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public async refreshController(showErrors: boolean = true, namespace: string): Promise<void> {
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this._azApi.az.arcdata.dc.config.show(namespace, this.azAdditionalEnvVars).then(result => {
|
this._azApi.az.arcdata.dc.config.show(namespace, this.azAdditionalEnvVars).then(result => {
|
||||||
this._controllerConfig = result.stdout;
|
this._controllerConfig = result.stdout;
|
||||||
@@ -108,38 +98,6 @@ export class ControllerModel {
|
|||||||
throw err;
|
throw err;
|
||||||
})
|
})
|
||||||
]);
|
]);
|
||||||
}
|
|
||||||
|
|
||||||
public async refreshDirectMode(resourceGroup: string, namespace: string): Promise<void> {
|
|
||||||
const newRegistrations: Registration[] = [];
|
|
||||||
await Promise.all([
|
|
||||||
this._azApi.az.postgres.arcserver.list(namespace, this.azAdditionalEnvVars).then(result => {
|
|
||||||
newRegistrations.push(...result.stdout.map(r => {
|
|
||||||
return {
|
|
||||||
instanceName: r.name,
|
|
||||||
state: r.state,
|
|
||||||
instanceType: ResourceType.postgresInstances
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
}),
|
|
||||||
this._azApi.az.sql.miarc.list({ resourceGroup: resourceGroup, namespace: undefined }, this.azAdditionalEnvVars).then(result => {
|
|
||||||
newRegistrations.push(...result.stdout.map(r => {
|
|
||||||
return {
|
|
||||||
instanceName: r.name,
|
|
||||||
state: r.state,
|
|
||||||
instanceType: ResourceType.sqlManagedInstances
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
|
|
||||||
})
|
|
||||||
]).then(() => {
|
|
||||||
this._registrations = newRegistrations;
|
|
||||||
this.registrationsLastUpdated = new Date();
|
|
||||||
this._onRegistrationsUpdated.fire(this._registrations);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public async refreshIndirectMode(namespace: string): Promise<void> {
|
|
||||||
const newRegistrations: Registration[] = [];
|
const newRegistrations: Registration[] = [];
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this._azApi.az.postgres.arcserver.list(namespace, this.azAdditionalEnvVars).then(result => {
|
this._azApi.az.postgres.arcserver.list(namespace, this.azAdditionalEnvVars).then(result => {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import { ConnectToMiaaSqlDialog } from '../ui/dialogs/connectMiaaDialog';
|
|||||||
import { AzureArcTreeDataProvider } from '../ui/tree/azureArcTreeDataProvider';
|
import { AzureArcTreeDataProvider } from '../ui/tree/azureArcTreeDataProvider';
|
||||||
import { ControllerModel, Registration } from './controllerModel';
|
import { ControllerModel, Registration } from './controllerModel';
|
||||||
import { ResourceModel } from './resourceModel';
|
import { ResourceModel } from './resourceModel';
|
||||||
import { ConnectionMode } from '../constants';
|
|
||||||
|
|
||||||
export type DatabaseModel = { name: string, status: string, earliestBackup: string, lastBackup: string };
|
export type DatabaseModel = { name: string, status: string, earliestBackup: string, lastBackup: string };
|
||||||
export type RPModel = { recoveryPointObjective: string, retentionDays: string };
|
export type RPModel = { recoveryPointObjective: string, retentionDays: string };
|
||||||
@@ -100,16 +99,6 @@ export class MiaaModel extends ResourceModel {
|
|||||||
try {
|
try {
|
||||||
try {
|
try {
|
||||||
let result;
|
let result;
|
||||||
if (this.controllerModel.info.connectionMode.toLowerCase() === ConnectionMode.direct) {
|
|
||||||
result = await this._azApi.az.sql.miarc.show(
|
|
||||||
this.info.name,
|
|
||||||
{
|
|
||||||
resourceGroup: this.controllerModel.info.resourceGroup,
|
|
||||||
namespace: undefined
|
|
||||||
},
|
|
||||||
this.controllerModel.azAdditionalEnvVars
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
result = await this._azApi.az.sql.miarc.show(
|
result = await this._azApi.az.sql.miarc.show(
|
||||||
this.info.name,
|
this.info.name,
|
||||||
{
|
{
|
||||||
@@ -118,7 +107,6 @@ export class MiaaModel extends ResourceModel {
|
|||||||
},
|
},
|
||||||
this.controllerModel.azAdditionalEnvVars
|
this.controllerModel.azAdditionalEnvVars
|
||||||
);
|
);
|
||||||
}
|
|
||||||
this._config = result.stdout;
|
this._config = result.stdout;
|
||||||
this.configLastUpdated = new Date();
|
this.configLastUpdated = new Date();
|
||||||
this.rpSettings.retentionDays = this._config?.spec?.backup?.retentionPeriodInDays?.toString() ?? '';
|
this.rpSettings.retentionDays = this._config?.spec?.backup?.retentionPeriodInDays?.toString() ?? '';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as azExt from 'az-ext';
|
import * as azExt from 'az-ext';
|
||||||
import * as loc from '../../../localizedConstants';
|
import * as loc from '../../../localizedConstants';
|
||||||
import { IconPathHelper, cssStyles, ConnectionMode } from '../../../constants';
|
import { IconPathHelper, cssStyles } from '../../../constants';
|
||||||
import { DashboardPage } from '../../components/dashboardPage';
|
import { DashboardPage } from '../../components/dashboardPage';
|
||||||
import { MiaaModel, RPModel, DatabaseModel, systemDbs } from '../../../models/miaaModel';
|
import { MiaaModel, RPModel, DatabaseModel, systemDbs } from '../../../models/miaaModel';
|
||||||
import { ControllerModel } from '../../../models/controllerModel';
|
import { ControllerModel } from '../../../models/controllerModel';
|
||||||
@@ -220,15 +220,6 @@ export class MiaaBackupsPage extends DashboardPage {
|
|||||||
cancellable: false
|
cancellable: false
|
||||||
},
|
},
|
||||||
async (_progress, _token): Promise<void> => {
|
async (_progress, _token): Promise<void> => {
|
||||||
if (this._miaaModel.controllerModel.info.connectionMode.toLowerCase() === ConnectionMode.direct) {
|
|
||||||
await this._azApi.az.sql.miarc.update(
|
|
||||||
this._miaaModel.info.name,
|
|
||||||
this._saveArgs,
|
|
||||||
this._miaaModel.controllerModel.info.resourceGroup,
|
|
||||||
undefined, // Indirect mode argument - namespace
|
|
||||||
undefined, // Indirect mode argument - usek8s
|
|
||||||
this._miaaModel.controllerModel.azAdditionalEnvVars);
|
|
||||||
} else {
|
|
||||||
await this._azApi.az.sql.miarc.update(
|
await this._azApi.az.sql.miarc.update(
|
||||||
this._miaaModel.info.name,
|
this._miaaModel.info.name,
|
||||||
this._saveArgs,
|
this._saveArgs,
|
||||||
@@ -236,7 +227,6 @@ export class MiaaBackupsPage extends DashboardPage {
|
|||||||
this._miaaModel.controllerModel.info.namespace,
|
this._miaaModel.controllerModel.info.namespace,
|
||||||
true,
|
true,
|
||||||
this._miaaModel.controllerModel.azAdditionalEnvVars);
|
this._miaaModel.controllerModel.azAdditionalEnvVars);
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
await this._miaaModel.refresh();
|
await this._miaaModel.refresh();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as azExt from 'az-ext';
|
import * as azExt from 'az-ext';
|
||||||
import * as loc from '../../../localizedConstants';
|
import * as loc from '../../../localizedConstants';
|
||||||
import { IconPathHelper, cssStyles, ConnectionMode } from '../../../constants';
|
import { IconPathHelper, cssStyles } from '../../../constants';
|
||||||
import { DashboardPage } from '../../components/dashboardPage';
|
import { DashboardPage } from '../../components/dashboardPage';
|
||||||
import { convertToGibibyteString } from '../../../common/utils';
|
import { convertToGibibyteString } from '../../../common/utils';
|
||||||
import { MiaaModel } from '../../../models/miaaModel';
|
import { MiaaModel } from '../../../models/miaaModel';
|
||||||
@@ -132,15 +132,6 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
|||||||
},
|
},
|
||||||
async (_progress, _token): Promise<void> => {
|
async (_progress, _token): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
if (this._miaaModel.controllerModel.info.connectionMode.toLowerCase() === ConnectionMode.direct) {
|
|
||||||
await this._azApi.az.sql.miarc.update(
|
|
||||||
this._miaaModel.info.name,
|
|
||||||
this.saveArgs,
|
|
||||||
this._miaaModel.controllerModel.info.resourceGroup,
|
|
||||||
undefined, // Indirect mode argument - namespace
|
|
||||||
undefined, // Indirect mode argument - usek8s
|
|
||||||
this._miaaModel.controllerModel.azAdditionalEnvVars);
|
|
||||||
} else {
|
|
||||||
await this._azApi.az.sql.miarc.update(
|
await this._azApi.az.sql.miarc.update(
|
||||||
this._miaaModel.info.name,
|
this._miaaModel.info.name,
|
||||||
this.saveArgs,
|
this.saveArgs,
|
||||||
@@ -148,7 +139,6 @@ export class MiaaComputeAndStoragePage extends DashboardPage {
|
|||||||
this._miaaModel.controllerModel.info.namespace,
|
this._miaaModel.controllerModel.info.namespace,
|
||||||
true,
|
true,
|
||||||
this._miaaModel.controllerModel.azAdditionalEnvVars);
|
this._miaaModel.controllerModel.azAdditionalEnvVars);
|
||||||
}
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.saveButton!.enabled = true;
|
this.saveButton!.enabled = true;
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import * as azExt from 'az-ext';
|
|||||||
import * as azurecore from 'azurecore';
|
import * as azurecore from 'azurecore';
|
||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import { getDatabaseStateDisplayText, promptForInstanceDeletion } from '../../../common/utils';
|
import { getDatabaseStateDisplayText, promptForInstanceDeletion } from '../../../common/utils';
|
||||||
import { ConnectionMode, cssStyles, IconPathHelper, miaaTroubleshootDocsUrl } from '../../../constants';
|
import { cssStyles, IconPathHelper, miaaTroubleshootDocsUrl } from '../../../constants';
|
||||||
import * as loc from '../../../localizedConstants';
|
import * as loc from '../../../localizedConstants';
|
||||||
import { ControllerModel } from '../../../models/controllerModel';
|
import { ControllerModel } from '../../../models/controllerModel';
|
||||||
import { MiaaModel } from '../../../models/miaaModel';
|
import { MiaaModel } from '../../../models/miaaModel';
|
||||||
@@ -243,16 +243,6 @@ export class MiaaDashboardOverviewPage extends DashboardPage {
|
|||||||
cancellable: false
|
cancellable: false
|
||||||
},
|
},
|
||||||
async (_progress, _token) => {
|
async (_progress, _token) => {
|
||||||
if (this._controllerModel.info.connectionMode.toLowerCase() === ConnectionMode.direct) {
|
|
||||||
return await this._azApi.az.sql.miarc.delete(
|
|
||||||
this._miaaModel.info.name,
|
|
||||||
{
|
|
||||||
resourceGroup: this._controllerModel.info.resourceGroup,
|
|
||||||
namespace: undefined,
|
|
||||||
},
|
|
||||||
this._controllerModel.azAdditionalEnvVars
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return await this._azApi.az.sql.miarc.delete(
|
return await this._azApi.az.sql.miarc.delete(
|
||||||
this._miaaModel.info.name,
|
this._miaaModel.info.name,
|
||||||
{
|
{
|
||||||
@@ -262,7 +252,6 @@ export class MiaaDashboardOverviewPage extends DashboardPage {
|
|||||||
this._controllerModel.azAdditionalEnvVars
|
this._controllerModel.azAdditionalEnvVars
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
);
|
);
|
||||||
await this._controllerModel.refreshTreeNode();
|
await this._controllerModel.refreshTreeNode();
|
||||||
vscode.window.showInformationMessage(loc.instanceDeleted(this._miaaModel.info.name));
|
vscode.window.showInformationMessage(loc.instanceDeleted(this._miaaModel.info.name));
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
|
|||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
import * as azExt from 'az-ext';
|
import * as azExt from 'az-ext';
|
||||||
import * as loc from '../../../localizedConstants';
|
import * as loc from '../../../localizedConstants';
|
||||||
import { IconPathHelper, cssStyles, ConnectionMode } from '../../../constants';
|
import { IconPathHelper, cssStyles } from '../../../constants';
|
||||||
import { DashboardPage } from '../../components/dashboardPage';
|
import { DashboardPage } from '../../components/dashboardPage';
|
||||||
import { ControllerModel } from '../../../models/controllerModel';
|
import { ControllerModel } from '../../../models/controllerModel';
|
||||||
import { UpgradeSqlMiaa } from '../../dialogs/upgradeSqlMiaa';
|
import { UpgradeSqlMiaa } from '../../dialogs/upgradeSqlMiaa';
|
||||||
@@ -160,16 +160,6 @@ export class MiaaUpgradeManagementPage extends DashboardPage {
|
|||||||
private async getMiaaVersion(): Promise<string | undefined> {
|
private async getMiaaVersion(): Promise<string | undefined> {
|
||||||
try {
|
try {
|
||||||
let miaaShowResult;
|
let miaaShowResult;
|
||||||
if (this._controllerModel.info.connectionMode.toLowerCase() === ConnectionMode.direct || this._controllerModel.controllerConfig?.spec.settings.azure.connectionMode.toLowerCase() === ConnectionMode.direct) {
|
|
||||||
miaaShowResult = await this._azApi.az.sql.miarc.show(
|
|
||||||
this._miaaModel.info.name,
|
|
||||||
{
|
|
||||||
resourceGroup: this._controllerModel.info.resourceGroup,
|
|
||||||
namespace: undefined
|
|
||||||
},
|
|
||||||
this._controllerModel.azAdditionalEnvVars
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
miaaShowResult = await this._azApi.az.sql.miarc.show(
|
miaaShowResult = await this._azApi.az.sql.miarc.show(
|
||||||
this._miaaModel.info.name,
|
this._miaaModel.info.name,
|
||||||
{
|
{
|
||||||
@@ -178,7 +168,6 @@ export class MiaaUpgradeManagementPage extends DashboardPage {
|
|||||||
},
|
},
|
||||||
this._controllerModel.azAdditionalEnvVars
|
this._controllerModel.azAdditionalEnvVars
|
||||||
);
|
);
|
||||||
}
|
|
||||||
return miaaShowResult.stdout.status.runningVersion;
|
return miaaShowResult.stdout.status.runningVersion;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(loc.showMiaaError, e);
|
console.error(loc.showMiaaError, e);
|
||||||
@@ -263,29 +252,6 @@ export class MiaaUpgradeManagementPage extends DashboardPage {
|
|||||||
try {
|
try {
|
||||||
upgradeButton.enabled = false;
|
upgradeButton.enabled = false;
|
||||||
vscode.window.showInformationMessage(loc.upgradingMiaa('kubectl get sqlmi -A\' should not be localized.'));
|
vscode.window.showInformationMessage(loc.upgradingMiaa('kubectl get sqlmi -A\' should not be localized.'));
|
||||||
if (this._controllerModel.info.connectionMode.toLowerCase() === ConnectionMode.direct) {
|
|
||||||
await vscode.window.withProgress(
|
|
||||||
{
|
|
||||||
location: vscode.ProgressLocation.Notification,
|
|
||||||
title: loc.upgradingDirectMiaa(this._miaaModel.info.name, this._controllerModel.info.resourceGroup),
|
|
||||||
cancellable: true
|
|
||||||
},
|
|
||||||
async (_progress, _token): Promise<void> => {
|
|
||||||
await this._azApi.az.sql.miarc.upgrade(
|
|
||||||
this._miaaModel.info.name,
|
|
||||||
{
|
|
||||||
resourceGroup: this._controllerModel.info.resourceGroup,
|
|
||||||
namespace: undefined
|
|
||||||
}
|
|
||||||
);
|
|
||||||
try {
|
|
||||||
await this._controllerModel.refresh(false, this._controllerModel.info.namespace);
|
|
||||||
} catch (error) {
|
|
||||||
vscode.window.showErrorMessage(loc.refreshFailed(error));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
await vscode.window.withProgress(
|
await vscode.window.withProgress(
|
||||||
{
|
{
|
||||||
location: vscode.ProgressLocation.Notification,
|
location: vscode.ProgressLocation.Notification,
|
||||||
@@ -307,7 +273,6 @@ export class MiaaUpgradeManagementPage extends DashboardPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,9 +117,9 @@ export function getAzApi(localAzDiscovered: Promise<IAzTool | undefined>, azTool
|
|||||||
delete: async (
|
delete: async (
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string;
|
resourceGroup?: string;
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string;
|
namespace?: string;
|
||||||
},
|
},
|
||||||
additionalEnvVars?: azExt.AdditionalEnvVars
|
additionalEnvVars?: azExt.AdditionalEnvVars
|
||||||
@@ -130,9 +130,9 @@ export function getAzApi(localAzDiscovered: Promise<IAzTool | undefined>, azTool
|
|||||||
},
|
},
|
||||||
list: async (
|
list: async (
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string;
|
resourceGroup?: string;
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string;
|
namespace?: string;
|
||||||
},
|
},
|
||||||
additionalEnvVars?: azExt.AdditionalEnvVars
|
additionalEnvVars?: azExt.AdditionalEnvVars
|
||||||
@@ -144,9 +144,9 @@ export function getAzApi(localAzDiscovered: Promise<IAzTool | undefined>, azTool
|
|||||||
show: async (
|
show: async (
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string;
|
resourceGroup?: string;
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string;
|
namespace?: string;
|
||||||
},
|
},
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
@@ -166,9 +166,9 @@ export function getAzApi(localAzDiscovered: Promise<IAzTool | undefined>, azTool
|
|||||||
noWait?: boolean;
|
noWait?: boolean;
|
||||||
syncSecondaryToCommit?: string;
|
syncSecondaryToCommit?: string;
|
||||||
},
|
},
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string,
|
namespace?: string,
|
||||||
usek8s?: boolean,
|
usek8s?: boolean,
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
@@ -181,9 +181,9 @@ export function getAzApi(localAzDiscovered: Promise<IAzTool | undefined>, azTool
|
|||||||
upgrade: async (
|
upgrade: async (
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string;
|
resourceGroup?: string;
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string;
|
namespace?: string;
|
||||||
},
|
},
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export class AzTool implements azExt.IAzApi {
|
|||||||
const argsArray = ['arcdata', 'dc', 'upgrade', '--desired-version', desiredVersion, '--name', name];
|
const argsArray = ['arcdata', 'dc', 'upgrade', '--desired-version', desiredVersion, '--name', name];
|
||||||
// Direct mode argument
|
// Direct mode argument
|
||||||
if (resourceGroup) { argsArray.push('--resource-group', resourceGroup); }
|
if (resourceGroup) { argsArray.push('--resource-group', resourceGroup); }
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
if (namespace) {
|
if (namespace) {
|
||||||
argsArray.push('--k8s-namespace', namespace);
|
argsArray.push('--k8s-namespace', namespace);
|
||||||
argsArray.push('--use-k8s');
|
argsArray.push('--use-k8s');
|
||||||
@@ -180,9 +180,9 @@ export class AzTool implements azExt.IAzApi {
|
|||||||
delete: (
|
delete: (
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string
|
namespace?: string
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
},
|
},
|
||||||
@@ -200,9 +200,9 @@ export class AzTool implements azExt.IAzApi {
|
|||||||
},
|
},
|
||||||
list: (
|
list: (
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string
|
namespace?: string
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
},
|
},
|
||||||
@@ -221,9 +221,9 @@ export class AzTool implements azExt.IAzApi {
|
|||||||
show: (
|
show: (
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string
|
namespace?: string
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
},
|
},
|
||||||
@@ -250,9 +250,9 @@ export class AzTool implements azExt.IAzApi {
|
|||||||
retentionDays?: string,
|
retentionDays?: string,
|
||||||
syncSecondaryToCommit?: string
|
syncSecondaryToCommit?: string
|
||||||
},
|
},
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string,
|
namespace?: string,
|
||||||
usek8s?: boolean,
|
usek8s?: boolean,
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
@@ -273,9 +273,9 @@ export class AzTool implements azExt.IAzApi {
|
|||||||
upgrade: (
|
upgrade: (
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string
|
namespace?: string
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
},
|
},
|
||||||
|
|||||||
20
extensions/azcli/src/typings/az-ext.d.ts
vendored
20
extensions/azcli/src/typings/az-ext.d.ts
vendored
@@ -575,9 +575,9 @@ declare module 'az-ext' {
|
|||||||
delete(
|
delete(
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string
|
namespace?: string
|
||||||
},
|
},
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
@@ -585,9 +585,9 @@ declare module 'az-ext' {
|
|||||||
): Promise<AzOutput<void>>,
|
): Promise<AzOutput<void>>,
|
||||||
list(
|
list(
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string
|
namespace?: string
|
||||||
},
|
},
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
@@ -596,9 +596,9 @@ declare module 'az-ext' {
|
|||||||
show(
|
show(
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string
|
namespace?: string
|
||||||
},
|
},
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
@@ -615,9 +615,9 @@ declare module 'az-ext' {
|
|||||||
retentionDays?: string, //5
|
retentionDays?: string, //5
|
||||||
syncSecondaryToCommit?: string //2
|
syncSecondaryToCommit?: string //2
|
||||||
},
|
},
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string,
|
namespace?: string,
|
||||||
usek8s?: boolean,
|
usek8s?: boolean,
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
@@ -626,9 +626,9 @@ declare module 'az-ext' {
|
|||||||
upgrade(
|
upgrade(
|
||||||
name: string,
|
name: string,
|
||||||
args: {
|
args: {
|
||||||
// Direct mode arguments
|
// ARM API arguments
|
||||||
resourceGroup?: string,
|
resourceGroup?: string,
|
||||||
// Indirect mode arguments
|
// K8s API arguments
|
||||||
namespace?: string
|
namespace?: string
|
||||||
},
|
},
|
||||||
// Additional arguments
|
// Additional arguments
|
||||||
|
|||||||
Reference in New Issue
Block a user