CloudEon icon indicating copy to clipboard operation
CloudEon copied to clipboard

[Feature] Passing configuration files and scripts using a configmap-based approach.

Open linshenkx opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe. 当前使用 目录挂载+ssh文件拷贝 的方式实现将配置文件及脚本传递给容器,这种做法太传统了。 应该改成基于configmap的实现,同时可以去除对ssh的依赖

Describe the solution you'd like

  1. 把配置的模板和datamodel都放configmap里面,把渲染的操作放到容器里,这样就可以获取到当前容器的运行配置,如实例名称、资源配置、节点名、hostname和ip等。
  2. 在原有的启动脚本之前,先执行一次渲染命令,得到所需的配置文件。这样做逻辑上比先根据不同实例生成多套配置文件,再复制到多个节点目录更简单直接。
  3. 组件之间的依赖文件,也可通过configmap分发。如hdfs部署的时候,可以生成core-site.xml、hdfs-site.xml在configmap里面,yarn只需要引入这个configmap即可

Describe alternatives you've considered 每个角色实例挂载一个角色通用的configmap+一个该实例特有的configmap,这样就不需要容器内再执行渲染,但会导致产生大量configmap,不优雅

linshenkx avatar Sep 24 '23 16:09 linshenkx