This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev-2.1.3
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev-2.1.3 by this push:
new 31c3e73e1 [Fix] k8sClusterId is none (#3541)
31c3e73e1 is described below
commit 31c3e73e11da8d34bb0a3e6f4589fa55a27a54f5
Author: Bibo <[email protected]>
AuthorDate: Wed Feb 7 20:47:52 2024 +0800
[Fix] k8sClusterId is none (#3541)
* fix k8sClusterId is none
* Update ApplicationServiceImpl.java
---------
Co-authored-by: bibo <[email protected]>
Co-authored-by: benjobs <[email protected]>
---
.../console/core/service/impl/ApplicationServiceImpl.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
index 2dd1681db..bfc65de78 100644
---
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
+++
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ApplicationServiceImpl.java
@@ -1569,8 +1569,8 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
String applicationArgs =
variableService.replaceVariable(application.getTeamId(),
application.getArgs());
- String k8sNamespace = null;
- String k8sClusterId = null;
+ String k8sNamespace;
+ String k8sClusterId;
FlinkK8sRestExposedType exposedType = null;
if (application.getExecutionModeEnum() ==
ExecutionMode.KUBERNETES_NATIVE_SESSION) {
// For compatibility with historical versions
@@ -1588,6 +1588,9 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
k8sClusterId = application.getJobName();
k8sNamespace = application.getK8sNamespace();
exposedType = application.getK8sRestExposedTypeEnum();
+ } else {
+ k8sNamespace = null;
+ k8sClusterId = null;
}
SubmitRequest submitRequest =
@@ -1687,8 +1690,7 @@ public class ApplicationServiceImpl extends
ServiceImpl<ApplicationMapper, Appli
if
(ExecutionMode.isKubernetesApplicationMode(application.getExecutionMode())) {
try {
- serviceHelper.configureIngress(
- application.getClusterId(), application.getK8sNamespace());
+ serviceHelper.configureIngress(k8sClusterId, k8sNamespace);
} catch (KubernetesClientException e) {
log.info("Failed to create ingress, stack info:{}",
e.getMessage());
applicationLog.setException(e.getMessage());