diff --git a/dinky-gateway/src/main/java/org/dinky/gateway/kubernetes/KubernetesGateway.java b/dinky-gateway/src/main/java/org/dinky/gateway/kubernetes/KubernetesGateway.java index f0eef28b68..7357696947 100644 --- a/dinky-gateway/src/main/java/org/dinky/gateway/kubernetes/KubernetesGateway.java +++ b/dinky-gateway/src/main/java/org/dinky/gateway/kubernetes/KubernetesGateway.java @@ -84,6 +84,11 @@ public void init() { protected void initConfig() { flinkConfigPath = config.getClusterConfig().getFlinkConfigPath(); flinkConfig = config.getFlinkConfig(); + String jobName = flinkConfig.getJobName(); + if (null != jobName && jobName.contains("_")) { + jobName = jobName.replace("_", "-"); + flinkConfig.setJobName(jobName); + } k8sConfig = config.getKubernetesConfig(); configuration.set(CoreOptions.CLASSLOADER_RESOLVE_ORDER, "parent-first"); diff --git a/dinky-web/src/pages/DataStudio/LeftContainer/Project/JobModal/index.tsx b/dinky-web/src/pages/DataStudio/LeftContainer/Project/JobModal/index.tsx index 42d2a41fa8..30323f9b92 100644 --- a/dinky-web/src/pages/DataStudio/LeftContainer/Project/JobModal/index.tsx +++ b/dinky-web/src/pages/DataStudio/LeftContainer/Project/JobModal/index.tsx @@ -165,9 +165,7 @@ const JobModal: React.FC = (props) => { * @param value */ const validateName = async (rule: any, value: string) => { - if (/_/g.test(value)) { - return Promise.reject(l('catalog.name.validate.error')); - } else if (!value) { + if (!value) { return Promise.reject(l('catalog.name.placeholder')); } else { return Promise.resolve();