Unverified Commit 670d0e8d authored by ZackYoung's avatar ZackYoung Committed by GitHub

[Fix][k8s]k8s_fix (#1366)

* k8s_fix * k8s_fix
parent 3c0dae5e
......@@ -283,6 +283,7 @@
<!--注意这玩意默认从编译结果目录开始算目录结构-->
<exclude>/application*.yml</exclude>
<exclude>/mybatis*.xml</exclude>
<exclude>/DinkyFlinkDockerfile</exclude>
</excludes>
</configuration>
<executions>
......
......@@ -110,19 +110,18 @@ public class ClusterConfigurationServiceImpl extends SuperServiceImpl<ClusterCon
if (kubernetesConfig.containsKey("kubernetes.container.image")) {
gatewayConfig.getFlinkConfig().getConfiguration().put("kubernetes.container.image", kubernetesConfig.get("kubernetes.container.image").toString());
}
}
String fileDir = FileUtil.isDirectory(PathConstant.WORK_DIR + "/dlink-doc") ? PathConstant.WORK_DIR + "/dlink-doc" : PathConstant.WORK_DIR;
File dockerFile = null;
try {
dockerFile = FileUtil.writeUtf8String(FileUtil.readUtf8String(dockerfileResource.getFile()), fileDir + "/DinkyFlinkDockerfile");
Docker docker = Docker.build((Map) getClusterConfigById(clusterConfiguration.getId()).getConfig().get("dockerConfig"));
if (docker != null && StringUtils.isNotBlank(docker.getInstance())) {
new DockerClientUtils(docker,dockerFile).initImage();
String fileDir = FileUtil.isDirectory(PathConstant.WORK_DIR + "/dlink-doc") ? PathConstant.WORK_DIR + "/dlink-doc" : PathConstant.WORK_DIR;
File dockerFile = null;
try {
dockerFile = FileUtil.writeUtf8String(FileUtil.readUtf8String(dockerfileResource.getFile()), fileDir + "/DinkyFlinkDockerfile");
Docker docker = Docker.build((Map) getClusterConfigById(clusterConfiguration.getId()).getConfig().get("dockerConfig"));
if (docker != null && StringUtils.isNotBlank(docker.getInstance())) {
new DockerClientUtils(docker,dockerFile).initImage();
}
} catch (Exception e) {
throw new RuntimeException(e);
}
} catch (Exception e) {
throw new RuntimeException(e);
}
return JobManager.testGateway(gatewayConfig);
}
}
# 用来构建dinky环境
FROM flink:1.14.5
ARG FLINK_VERSION=1.14.5
FROM flink:${FLINK_VERSION}
ENV PYTHON_HOME /opt/miniconda3
......@@ -10,7 +11,7 @@ RUN ./miniconda.sh -b -p $PYTHON_HOME && chown -R flink $PYTHON_HOME && ls $PYTH
USER flink
ENV PATH $PYTHON_HOME/bin:$PATH
RUN pip install "apache-flink==1.14.5" -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN pip install "apache-flink==${FLINK_VERSION}" -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
RUN cp /opt/flink/opt/flink-python_* /opt/flink/lib/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment