From 30602bae513bde4ecbc68968744e12aa4bf1de51 Mon Sep 17 00:00:00 2001 From: ChengJie1053 <18033291053@163.com> Date: Sun, 17 Sep 2023 18:17:52 +0800 Subject: [PATCH] add labels --- .../FlinkDeploymentOperatorClusterDescriptorAdapter.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/linkis-engineconn-plugins/flink/flink-shims-1.16.2/src/main/java/org/apache/linkis/engineconnplugin/flink/client/shims/deployment/FlinkDeploymentOperatorClusterDescriptorAdapter.java b/linkis-engineconn-plugins/flink/flink-shims-1.16.2/src/main/java/org/apache/linkis/engineconnplugin/flink/client/shims/deployment/FlinkDeploymentOperatorClusterDescriptorAdapter.java index 7494e12d5e..2a6c43b3bc 100644 --- a/linkis-engineconn-plugins/flink/flink-shims-1.16.2/src/main/java/org/apache/linkis/engineconnplugin/flink/client/shims/deployment/FlinkDeploymentOperatorClusterDescriptorAdapter.java +++ b/linkis-engineconn-plugins/flink/flink-shims-1.16.2/src/main/java/org/apache/linkis/engineconnplugin/flink/client/shims/deployment/FlinkDeploymentOperatorClusterDescriptorAdapter.java @@ -38,7 +38,9 @@ import org.apache.flink.kubernetes.shaded.io.fabric8.kubernetes.client.dsl.NonNamespaceOperation; import java.io.Closeable; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; @@ -210,6 +212,9 @@ public FlinkDeployment getFlinkDeployment(String name, String namespace) { ObjectMeta metadata = new ObjectMeta(); metadata.setName(name); metadata.setNamespace(namespace); + Map labels = new HashMap<>(); + labels.put("from-app", "linkis"); + metadata.setLabels(labels); flinkDeployment.setMetadata(metadata); return flinkDeployment; }