[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

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( def kubernetes_url(
resource_type, resource_type,
namespace='default', namespace='default',
@ -151,7 +157,7 @@ def read_pods(cluster, namespace, spilo_cluster):
cluster=cluster, cluster=cluster,
resource_type='pods', resource_type='pods',
namespace=namespace, namespace=namespace,
label_selector={OPERATOR_CLUSTER_NAME_LABEL: spilo_cluster}, label_selector=cluster_labels(spilo_cluster),
) )