1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-07-02 11:21:00 +03:00
parent ef32476d49
commit c82f411a68
3 changed files with 4 additions and 13 deletions

View File

@ -87,10 +87,6 @@ export class ClusterManager {
protected async addNewCluster(clusterData: ClusterBaseInfo): Promise<Cluster> {
return new Promise(async (resolve, reject) => {
logger.info(`*******addNewCluster: ${JSON.stringify(clusterData)}`)
try {
const kc = this.loadKubeConfig(clusterData.kubeConfigPath)
k8s.validateConfig(kc)

View File

@ -8,28 +8,24 @@ import { KubeAuthProxy } from "./kube-auth-proxy"
import { Cluster, ClusterPreferences } from "./cluster"
import { prometheusProviders } from "../common/prometheus-providers"
import { PrometheusService, PrometheusProvider } from "./prometheus/provider-registry"
import { PrometheusLens } from "./prometheus/lens"
import { KubeconfigManager } from "./kubeconfig-manager"
export class ContextHandler {
public contextName: string
public id: string
public url: string
public clusterUrl: url.UrlWithStringQuery
public proxyServer: KubeAuthProxy
public proxyPort: number
public certData: string
public authCertData: string
public cluster: Cluster
protected apiTarget: ServerOptions
protected proxyTarget: ServerOptions
public clusterUrl: url.UrlWithStringQuery
public proxyServer: KubeAuthProxy
protected clientCert: string
protected clientKey: string
protected secureApiConnection = true
protected defaultNamespace: string
public proxyPort: number
protected kubernetesApi: string
protected prometheusProvider: string
protected prometheusPath: string

View File

@ -59,7 +59,6 @@ class ApiWatcher {
}
private doneHandler(error: Error) {
logger.debug("********** watch.doneHandler")
if (error) logger.warn("watch ended: " + error.toString())
this.sendEvent({
@ -96,7 +95,7 @@ class WatchRoute extends LensApi {
logger.debug("watch using kubeconfig:" + JSON.stringify(cluster.proxyKubeconfig(), null, 2))
apis.forEach(apiUrl => {
const watcher = new ApiWatcher(apiUrl, cluster.proxyKubeconfig() /*cluster.contextHandler.kc*/, response)
const watcher = new ApiWatcher(apiUrl, cluster.proxyKubeconfig(), response)
watcher.start()
watchers.push(watcher)
})