From e5a9ec3a7c43a2b521c63018aaf99197a8c32162 Mon Sep 17 00:00:00 2001 From: Sanjeev Kulkarni Date: Tue, 4 Dec 2018 16:31:46 -0800 Subject: [PATCH] Fixed Kubernetes runtime bug (#3123) --- .../apache/pulsar/functions/runtime/KubernetesRuntime.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java index cd83e69a15c2d..9ae3bfc047947 100644 --- a/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java +++ b/pulsar-functions/runtime/src/main/java/org/apache/pulsar/functions/runtime/KubernetesRuntime.java @@ -524,10 +524,9 @@ private Map getPrometheusAnnotations() { private Map getLabels(Function.FunctionDetails functionDetails) { final Map labels = new HashMap<>(); - labels.put("namespace", String.format("%s/%s",functionDetails.getTenant(), functionDetails.getNamespace())); + labels.put("namespace", functionDetails.getNamespace()); labels.put("tenant", functionDetails.getTenant()); - labels.put("function", String.format("%s/%s/%s", functionDetails.getTenant(), - functionDetails.getNamespace(), functionDetails.getName())); + labels.put("function", functionDetails.getName()); if (customLabels != null && !customLabels.isEmpty()) { labels.putAll(customLabels); }