Best CD strategy for Kubernetes Deployments

前端 未结 2 364
谎友^
谎友^ 2021-01-04 05:55

Our current CI deployment phase works like this:

  1. Build the containers.
  2. Tag the images as \"latest\" and < commit hash >
2条回答
  •  南笙
    南笙 (楼主)
    2021-01-04 06:48

    The Deployment only monitors for pod template (.spec.template) changes. If the image name didn't change, the Deployment won't do the update. You can trigger the rolling update (with Deployments) by changing the pod template, for example, label it with commit hash. Also, you'll need to set .spec.template.spec.containers.imagePullPolicy to Always (it's set to Always by default if :latest tag is specified and cannot be update), otherwise the image will be reused.

提交回复
热议问题