Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dlink
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaowei
dlink
Commits
e4ce7780
Commit
e4ce7780
authored
Jun 09, 2022
by
wuhuiqiang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Flink on K8s,修复读取不到K8s集群自定义参数问题
parent
6833b22a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
JobConfig.java
dlink-core/src/main/java/com/dlink/job/JobConfig.java
+4
-9
No files found.
dlink-core/src/main/java/com/dlink/job/JobConfig.java
View file @
e4ce7780
...
@@ -185,15 +185,10 @@ public class JobConfig {
...
@@ -185,15 +185,10 @@ public class JobConfig {
gatewayConfig
.
setFlinkConfig
(
FlinkConfig
.
build
((
Map
<
String
,
String
>)
config
.
get
(
"flinkConfig"
)));
gatewayConfig
.
setFlinkConfig
(
FlinkConfig
.
build
((
Map
<
String
,
String
>)
config
.
get
(
"flinkConfig"
)));
}
}
if
(
config
.
containsKey
(
"kubernetesConfig"
))
{
if
(
config
.
containsKey
(
"kubernetesConfig"
))
{
Map
kubernetesConfig
=
(
Map
)
config
.
get
(
"kubernetesConfig"
);
Map
<
String
,
Object
>
kubernetesConfig
=
(
Map
<
String
,
Object
>)
config
.
get
(
"kubernetesConfig"
);
if
(
kubernetesConfig
.
containsKey
(
"kubernetes.namespace"
))
{
//构建GatewayConfig时,将k8s集群默认配置和自定义参数配置加载到FlinkConfig里
gatewayConfig
.
getFlinkConfig
().
getConfiguration
().
put
(
"kubernetes.namespace"
,
kubernetesConfig
.
get
(
"kubernetes.namespace"
).
toString
());
for
(
Map
.
Entry
<
String
,
Object
>
entry:
kubernetesConfig
.
entrySet
()){
}
gatewayConfig
.
getFlinkConfig
().
getConfiguration
().
put
(
entry
.
getKey
(),
entry
.
getValue
().
toString
());
if
(
kubernetesConfig
.
containsKey
(
"kubernetes.cluster-id"
))
{
gatewayConfig
.
getFlinkConfig
().
getConfiguration
().
put
(
"kubernetes.cluster-id"
,
kubernetesConfig
.
get
(
"kubernetes.cluster-id"
).
toString
());
}
if
(
kubernetesConfig
.
containsKey
(
"kubernetes.container.image"
))
{
gatewayConfig
.
getFlinkConfig
().
getConfiguration
().
put
(
"kubernetes.container.image"
,
kubernetesConfig
.
get
(
"kubernetes.container.image"
).
toString
());
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment