Our current CI deployment phase works like this:
"latest"
and < commit hash >
.This has been working great for RC based deployments, but now that the Deployment
object is becoming more stable and an underlying feature, we want to take advantage of this abstraction over our current deployment schemes and development phases.
What I'm having trouble with is finding a sane way to automate the update of a Deployment
with the CI workflow. What I've been experimenting with is splitting up the git repo's and doing something like:
"latest"
and < commit hash >
.Deployment
repo, passing through the current commit hash.image: app-%%COMMIT_HASH%%
)Deployment
resource(s).Surely though there's a better way to handle this. It would be great if the Deployment
monitored for hash changes of the image's "latest" tag...maybe it already does? I haven't had success with this. Any thoughts or insights on how to better handle the deployment of Deployment
would be appreciated :)
Unlike external CD tools that only enable push-based deployments, Argo CD can pull updated code from Git repositories and deploy it directly to Kubernetes resources. It enables developers to manage both infrastructure configuration and application updates in one system.
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 Deployment
s) 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With