We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://howieyuen.github.io/docs/kubernetes/kube-controller-manager/k8s-apps-rolling-update/#23-%E6%BB%9A%E5%8A%A8%E6%9B%B4%E6%96%B0%E7%A4%BA%E4%BE%8B
The text was updated successfully, but these errors were encountered:
No branches or pull requests
https://howieyuen.github.io/docs/kubernetes/kube-controller-manager/k8s-apps-rolling-update/#23-%E6%BB%9A%E5%8A%A8%E6%9B%B4%E6%96%B0%E7%A4%BA%E4%BE%8B
RollingUpdate Recreate 其中,滚动更新是最常见的,阅读代码 pkg/controller/deployment/deployment_controller.go:648, 可以看到 2 种方式分别对应的业务逻辑:
func (dc *DeploymentController) syncDeployment(key string) error { ... switch d.Spec.Strategy.Type { case apps.RecreateDeploymentStrategyType: return dc.rolloutRecreate(d, rsList, podMap) case apps.RollingUpdateDeploymentStrategyType: return dc.rolloutRolling(d, rsList) } ... } 根据 d.Spec.Strategy.Type,若更新策略为 RollingUpdate, 则执行 dc.rolloutRecreate() 方法,具体逻辑如下:
func (dc *DeploymentController) rolloutRolling(d *apps.Deployment, rsList []*apps.ReplicaSet) error { // 1、获取所有的 rs,若没有 newRS 则创建 newRS, oldRSs, err := dc.
The text was updated successfully, but these errors were encountered: