Remove api_resources duplicates
This commit is contained in:
parent
7f49e12017
commit
610bdb6cfd
2
kls
2
kls
|
@ -50,7 +50,7 @@ menu1 = Menu("Namespaces", namespaces, 0, curses.COLS // 5, SELECTED_WITHOUT_SEA
|
||||||
|
|
||||||
# рисуем второе меню
|
# рисуем второе меню
|
||||||
## готовим контент
|
## готовим контент
|
||||||
api_resources_top = ["pods", "services", "deployments", "statefulsets", "ingresses", "configmaps", "secrets", "persistentvolumes", "nodes", "storageclasses"]
|
api_resources_top = ["pods", "services", "deployments.apps", "statefulsets.apps", "ingresses", "configmaps", "secrets", "persistentvolumes", "persistentvolumeclaims", "nodes", "storageclasses"]
|
||||||
bytes_list = subprocess.check_output("kubectl api-resources -o name --verbs get", shell=True).split()
|
bytes_list = subprocess.check_output("kubectl api-resources -o name --verbs get", shell=True).split()
|
||||||
api_resources_kubectl = [bytes_list[i].decode('utf-8') for i in range(len(bytes_list))]
|
api_resources_kubectl = [bytes_list[i].decode('utf-8') for i in range(len(bytes_list))]
|
||||||
api_resources = api_resources_top + sorted(list(set(api_resources_kubectl) - set(api_resources_top)))
|
api_resources = api_resources_top + sorted(list(set(api_resources_kubectl) - set(api_resources_top)))
|
||||||
|
|
Loading…
Reference in New Issue