Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature]开发bcs-cc-agent模块 #496

Closed
bryanhe-bupt opened this issue Jun 11, 2020 · 3 comments
Closed

[feature]开发bcs-cc-agent模块 #496

bryanhe-bupt opened this issue Jun 11, 2020 · 3 comments
Assignees
Labels
confirmed issue is confirmed feature new feature inner issue comes from Tencent side
Milestone

Comments

@bryanhe-bupt
Copy link
Contributor

feature相关背景与描述
业务方希望在容器中能拿到所在host主机的cmdb信息,包括机房、机架、region、zone等

解决方案描述
开发bcs-cc-agent模块,以daemonset方式部署在集群中,周期性地去从bk-cmdb获取node信息,写入到node上的一个固定文件,并更新node的label。
业务容器可以挂载node上的这个文件,在容器中source这个文件后,所有的机器信息就会写入到业务容器的环境变量当中。

@bryanhe-bupt bryanhe-bupt added the feature new feature label Jun 11, 2020
bryanhe-bupt added a commit to bryanhe-bupt/bk-bcs that referenced this issue Jun 11, 2020
@sharego
Copy link

sharego commented Jun 11, 2020

建议参考 Docker ComposeEnv-File: https://docs.docker.com/compose/env-file/ 该文件格式与Systemd的 EnvironmentFile 也是兼容的。虽然不能用 source直接导出到环境变量,但兼容性更强。

@DeveloperJim DeveloperJim added confirmed issue is confirmed inner issue comes from Tencent side k8s labels Jun 29, 2020
@DeveloperJim DeveloperJim added this to the 1.18.x milestone Jun 29, 2020
@bryanhe-bupt
Copy link
Contributor Author

建议参考 Docker ComposeEnv-File: https://docs.docker.com/compose/env-file/ 该文件格式与Systemd的 EnvironmentFile 也是兼容的。虽然不能用 source直接导出到环境变量,但兼容性更强。

感谢关注。因为业务程序需要在pod容器中识别到机器信息,业务进程需要以最简便的方式能拿到,容器镜像在启动前source一下环境变量对业务来说成本最小,他们也不关注compose等兼容性,在容器中也很少会使用systemd。因此,这里先选择了source导出环境变量的方式。
后续如果业务有这方面的需求,我们会考虑加以改进。

@sharego
Copy link

sharego commented Jun 29, 2020

好的,明白了,多谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed issue is confirmed feature new feature inner issue comes from Tencent side
Projects
None yet
Development

No branches or pull requests

3 participants