Skip to content

Commit

Permalink
[Bug] Fix k8s test bug (#3997)
Browse files Browse the repository at this point in the history
Co-authored-by: gaoyan1998 <gaoyan1998@users.noreply.github.com>
  • Loading branch information
gaoyan1998 and gaoyan1998 authored Dec 3, 2024
1 parent 1ffe49f commit 3b48594
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ public void init() {
protected void initConfig() {
flinkConfigPath = config.getClusterConfig().getFlinkConfigPath();
flinkConfig = config.getFlinkConfig();
if (!isValidTaskName(flinkConfig.getJobName())) {
throw new GatewayException(
"In Kubernetes mode, task names must start and end with a lowercase letter or a digit, "
+ "and can contain lowercase letters, digits, dots, and hyphens in between.");
String jobName = flinkConfig.getJobName();
if (TextUtil.isEmpty(jobName)) {
jobName = this.configuration.getString(KubernetesConfigOptions.CLUSTER_ID.key(), null);
}
if (!isValidTaskName(jobName)) {
throw new GatewayException(jobName
+ " is not Valid. In Kubernetes mode, task names must start and end with a lowercase letter or a digit, "
+ "and can contain lowercase letters, digits, dots, and hyphens in between.");
}
k8sConfig = config.getKubernetesConfig();

Expand Down

0 comments on commit 3b48594

Please sign in to comment.