fix(core): update

This commit is contained in:
Philipp Kunz 2020-01-18 18:47:46 +00:00
parent 1eb2bb042e
commit 201d611881
4 changed files with 17 additions and 2 deletions

View File

@ -9,7 +9,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"test": "(tstest test/)", "test": "(tstest test/)",
"build": "(tsbuild --web)", "build": "(tsbuild)",
"format": "(gitzone format)" "format": "(gitzone format)"
}, },
"devDependencies": { "devDependencies": {

View File

@ -1,8 +1,10 @@
import { expect, tap } from '@pushrocks/tapbundle'; import { expect, tap } from '@pushrocks/tapbundle';
import * as kubernetes from '../ts/index'; import * as kubernetes from '../ts/index';
let testClient = kubernetes.KubeClient;
tap.test('first test', async () => { tap.test('first test', async () => {
console.log(kubernetes.standardExport);
}); });
tap.start(); tap.start();

View File

@ -0,0 +1 @@
export * from './kubernetes.classes.kubeclient';

View File

@ -1,5 +1,17 @@
import * as plugins from './kubernetes.plugins'; import * as plugins from './kubernetes.plugins';
export class KubeClient { export class KubeClient {
public client: plugins.kubectl.ApiRoot;
constructor() {};
public async init () {
const { KubeConfig } = require('kubernetes-client')
const kubeconfig = new KubeConfig()
kubeconfig.loadFromFile('~/some/path');
const Request = require('kubernetes-client/backends/request');
const backend = new Request({ kubeconfig });
this.client = new plugins.kubectl.Client1_13({ backend, version: '1.13' })
}
} }