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

post/configmap-hotreload/ #6

Open
utterances-bot opened this issue May 21, 2019 · 3 comments
Open

post/configmap-hotreload/ #6

utterances-bot opened this issue May 21, 2019 · 3 comments

Comments

@utterances-bot
Copy link

Kubernetes Pod 中的 ConfigMap 配置更新

https://aleiwu.com/post/configmap-hotreload/

Copy link

hi, Aylei, 场景二,Pod 滚动更新一:修改 CI 流程 这一节是不是这样理解: CI脚本 watch configmap的变化,有变化了就通知deployment做一个更新(比如kubectl apply 更新后的.yaml)。

这里的CI是类比 开发/测试中持续集成的概念, 能持续更新deployment

Copy link
Owner

aylei commented May 21, 2019

hi, Aylei, 场景二,Pod 滚动更新一:修改 CI 流程 这一节是不是这样理解: CI脚本 watch configmap的变化,有变化了就通知deployment做一个更新(比如kubectl apply 更新后的.yaml)。

并没有类比, 就是指常规的 CI, 这里预设了配置变更是由开发或运维发起的(比如一个 Pull Request), PR 合并后触发 CI 更新 k8s 资源. 而重新计算 Hash 值就是在更新 k8s 资源前增加了一个操作

Copy link

Hello, 以前碰到过类似得需求. 当时的做法是用 Liveness 调用个脚本, 脚本里判断文件是否变动. 如果变动, Liveness 得到 false, 重启 pod. 也可以同时设置 Readiness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants