fix(core): update
This commit is contained in:
parent
1eb2bb042e
commit
201d611881
@ -9,7 +9,7 @@
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild --web)",
|
||||
"build": "(tsbuild)",
|
||||
"format": "(gitzone format)"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -1,8 +1,10 @@
|
||||
import { expect, tap } from '@pushrocks/tapbundle';
|
||||
import * as kubernetes from '../ts/index';
|
||||
|
||||
let testClient = kubernetes.KubeClient;
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log(kubernetes.standardExport);
|
||||
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
@ -0,0 +1 @@
|
||||
export * from './kubernetes.classes.kubeclient';
|
@ -1,5 +1,17 @@
|
||||
import * as plugins from './kubernetes.plugins';
|
||||
|
||||
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' })
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user