Remove tiller namespace lookup

This commit is contained in:
Jonathan Ervine 2020-12-16 13:42:21 +08:00
parent 09470d125a
commit a8a7a19fdd

12
main.py
View File

@ -23,18 +23,6 @@ def get_namespaces():
ns = v1.list_namespace() ns = v1.list_namespace()
return ns return ns
def get_tiller_namespaces():
command = "/usr/local/bin/kubectl get deploy --all-namespaces -l name=tiller -ojson"
info(f"Running command: {command}")
try:
output = check_output(command.split(" "), stderr=STDOUT).decode("utf-8")
except CalledProcessError as err:
error(err.output.decode("utf-8"))
raise err
info(f"Output from command:\n{output}")
data = json.loads(output)
return data
def get_deployments(namespace): def get_deployments(namespace):
command = "/usr/local/bin/kubectl -n " + namespace + " get deploy -ojson" command = "/usr/local/bin/kubectl -n " + namespace + " get deploy -ojson"
info(f"Running command: {command}") info(f"Running command: {command}")