Change azdata executions to point to kube config and cluster contexts (#13569)

This commit is contained in:
Arvind Ranasaria
2020-12-23 23:45:00 -08:00
committed by GitHub
parent cf7c506d75
commit f314a9e1e6
24 changed files with 180 additions and 114 deletions

View File

@@ -271,11 +271,19 @@ export class PasswordToControllerDialog extends ControllerDialogBase {
}
const azdataApi = <azdataExt.IExtension>vscode.extensions.getExtension(azdataExt.extension.name)?.exports;
try {
await azdataApi.azdata.login(this.urlInputBox.value!, this.usernameInputBox.value!, this.passwordInputBox.value);
await azdataApi.azdata.login(
this.urlInputBox.value!,
this.usernameInputBox.value!,
this.passwordInputBox.value,
{
'KUBECONFIG': this.kubeConfigInputBox.value!,
'KUBECTL_CONTEXT': this.clusterContextRadioGroup.value!
}
);
} catch (e) {
if (getErrorMessage(e).match(/Wrong username or password/i)) {
this.dialog.message = {
text: loc.invalidPassword,
text: loc.loginFailed,
level: azdata.window.MessageLevel.Error
};
return false;
@@ -299,3 +307,5 @@ export class PasswordToControllerDialog extends ControllerDialogBase {
return dialog;
}
}