christophd commented on code in PR #14859: URL: https://github.com/apache/camel/pull/14859#discussion_r1681140543
########## dsl/camel-jbang/camel-jbang-plugin-kubernetes/src/main/java/org/apache/camel/dsl/jbang/core/commands/kubernetes/KubernetesExport.java: ########## @@ -195,12 +197,16 @@ public Integer export() throws Exception { .collect(Collectors.toMap(parts -> parts[0], parts -> parts[1]))); } - if (labels != null) { - context.addLabels(Arrays.stream(labels) - .map(item -> item.split("=")) - .filter(parts -> parts.length == 2) - .collect(Collectors.toMap(parts -> parts[0], parts -> parts[1]))); - } + labels = Optional.ofNullable(labels).orElse(new String[0]); + context.addLabels(Arrays.stream(labels) + .map(item -> item.split("=")) + .filter(parts -> parts.length == 2) + .collect(Collectors.toMap(parts -> parts[0], parts -> parts[1]))); + + // Always provide these labels + // if (!context.getLabels().containsKey("app.kubernetes.io/name")) { Review Comment: consider removing commented code -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org