Feature/mssql-big-data-cluster (#4107)

* Adding kubernetes installer.

* Adding variety of kubectl support and integrating into the kubeconfig target cluster page.

* Addressing PR comments, refactored utility file locations and added missing license headers.
This commit is contained in:
Ronald Quan
2019-02-25 15:09:22 -08:00
committed by GitHub
parent a71be2b193
commit d0a4a4242d
19 changed files with 1701 additions and 18 deletions

View File

@@ -6,6 +6,8 @@
import { IKubeConfigParser } from '../../data/kubeConfigParser';
import { ClusterInfo, TargetClusterType, ClusterPorts, ContainerRegistryInfo, TargetClusterTypeInfo, ToolInfo } from '../../interfaces';
import { getContexts, KubectlContext } from '../../kubectl/kubectlUtils';
import { Kubectl } from '../../kubectl/kubectl';
import * as nls from 'vscode-nls';
const localize = nls.loadMessageBundle();
@@ -14,11 +16,11 @@ export class CreateClusterModel {
private _tmp_tools_installed: boolean = false;
constructor(private _kubeConfigParser: IKubeConfigParser) {
constructor(private _kubectl : Kubectl) {
}
public loadClusters(configPath: string): ClusterInfo[] {
return this._kubeConfigParser.parse(configPath);
public async loadClusters(): Promise<KubectlContext[]> {
return await getContexts(this._kubectl);
}
public getDefaultPorts(): Thenable<ClusterPorts> {
@@ -107,7 +109,7 @@ export class CreateClusterModel {
public targetClusterType: TargetClusterType;
public selectedCluster: ClusterInfo;
public selectedCluster: KubectlContext;
public adminUserName: string;