refactoring / fixes

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-11 19:09:22 +03:00
1 parent 186d69dfc6
commit 35f081eaf4
27 files changed
+148 -155

No files matched your search

+3 -3
View File
@@ -53,7 +53,7 @@ export class MetricsFeature extends Feature {
async install(cluster: Cluster): Promise<boolean> {
// Check if there are storageclasses
const storageClient = cluster.proxyKubeconfig().makeApiClient(k8s.StorageV1Api)
const storageClient = cluster.getProxyKubeconfig().makeApiClient(k8s.StorageV1Api)
const scs = await storageClient.listStorageClass();
scs.body.items.forEach(sc => {
if(sc.metadata.annotations &&
@@ -93,9 +93,9 @@ export class MetricsFeature extends Feature {
async uninstall(cluster: Cluster): Promise<boolean> {
return new Promise<boolean>(async (resolve, reject) => {
const rbacClient = cluster.proxyKubeconfig().makeApiClient(RbacAuthorizationV1Api)
const rbacClient = cluster.getProxyKubeconfig().makeApiClient(RbacAuthorizationV1Api)
try {
await this.deleteNamespace(cluster.proxyKubeconfig(), "lens-metrics")
await this.deleteNamespace(cluster.getProxyKubeconfig(), "lens-metrics")
await rbacClient.deleteClusterRole("lens-prometheus");
await rbacClient.deleteClusterRoleBinding("lens-prometheus");
resolve(true);
+1 -1
View File
@@ -37,7 +37,7 @@ export class UserModeFeature extends Feature {
async uninstall(cluster: Cluster): Promise<boolean> {
return new Promise<boolean>(async (resolve, reject) => {
const rbacClient = cluster.proxyKubeconfig().makeApiClient(RbacAuthorizationV1Api)
const rbacClient = cluster.getProxyKubeconfig().makeApiClient(RbacAuthorizationV1Api)
try {
await rbacClient.deleteClusterRole("lens-user");
await rbacClient.deleteClusterRoleBinding("lens-user");