dromara / CloudEon

CloudEon uses Kubernetes to install and deploy open-source big data components, enabling the containerized operation of an open-source big data platform. This allows you to reduce your focus on underlying resource management and maintenance.
https://www.cloudeon.top/
Apache License 2.0
419 stars 100 forks source link

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

Open linshenkx opened 11 months ago

linshenkx commented 11 months ago

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,不优雅