diff --git a/src/modules/common/functions.py b/src/modules/common/functions.py index 3cb4adf..aa64e59 100644 --- a/src/modules/common/functions.py +++ b/src/modules/common/functions.py @@ -12,10 +12,11 @@ def matchLabels(match_labels=None, object_labels=None): object_labels = str(object_labels).replace("{", "").replace("}", "").replace("'", "").replace(" ", "").split(",") - for label in object_labels: - key, value = label.split(":")[0], label.split(":")[1] - for separator in ["=", ":"]: - if match_labels.split(separator)[0] == key and match_labels.split(separator)[1] == value: - return True + for object_label in object_labels: + key, value = object_label.split(":")[0], object_label.split(":")[1] + for match_label in match_labels: + for separator in ["=", ":"]: + if match_label.split(separator)[0] == key and match_label.split(separator)[1] == value: + return True return False diff --git a/src/modules/kubernetes/base/nodes.py b/src/modules/kubernetes/base/nodes.py index 6c4aee4..9fffb40 100644 --- a/src/modules/kubernetes/base/nodes.py +++ b/src/modules/kubernetes/base/nodes.py @@ -15,10 +15,6 @@ def kubernetesGetNodes(config=None): nodes = [] for node in kubernetes.list_node().items: - if node.spec.taints is not None: - if "node.kubernetes.io/not-ready" in str(node.spec.taints): - continue - node_healthz = kubernetes.connect_get_node_proxy_with_path(name=node.metadata.name, path="healthz") node_status = kubernetes.read_node_status(name=node.metadata.name) node_pods = kubernetes.list_pod_for_all_namespaces(field_selector="spec.nodeName={}".format(node.metadata.name)) diff --git a/src/modules/kubernetes/base/volumes.py b/src/modules/kubernetes/base/volumes.py index 4cdceef..777c5dd 100644 --- a/src/modules/kubernetes/base/volumes.py +++ b/src/modules/kubernetes/base/volumes.py @@ -15,10 +15,6 @@ def kubernetesGetVolumes(config=None): volumes = [] for node in kubernetes.list_node().items: - if node.spec.taints is not None: - if "node.kubernetes.io/not-ready" in str(node.spec.taints): - continue - node_info = kubernetes.connect_get_node_proxy_with_path(name=node.metadata.name, path="stats/summary").replace("'", "\"") node_json = json.loads(node_info)