[UI] on read_pods filter only spilo pods (#1297)

This commit is contained in:
Felix Kunde
2021-01-08 12:00:23 +01:00
committed by GitHub
parent 260714b657
commit 646c28e9c9
+7 -1
View File
@@ -107,6 +107,12 @@ def encode_labels(label_selector):
])
def cluster_labels(spilo_cluster):
labels = COMMON_CLUSTER_LABEL
labels[OPERATOR_CLUSTER_NAME_LABEL] = spilo_cluster
return labels
def kubernetes_url(
resource_type,
namespace='default',
@@ -151,7 +157,7 @@ def read_pods(cluster, namespace, spilo_cluster):
cluster=cluster,
resource_type='pods',
namespace=namespace,
label_selector={OPERATOR_CLUSTER_NAME_LABEL: spilo_cluster},
label_selector=cluster_labels(spilo_cluster),
)