sync sync all resources from state file (repos, releases and chart deps) apply apply all resources from state file only when there are changes
sync
The helmfile sync sub-command sync your cluster state as described in your helmfile ... Under the covers, Helmfile executes helm upgrade --install for each release declared in the manifest, by optionally decrypting secrets to be consumed as helm chart values. It also updates specified chart repositories and updates the dependencies of any referenced local charts. For Helm 2.9+ you can use a username and password to authenticate to a remote repository.
apply
The helmfile apply sub-command begins by executing diff. If diff finds that there is any changes sync is executed. Adding --interactive instructs Helmfile to request your confirmation before sync. An expected use-case of apply is to schedule it to run periodically, so that you can auto-fix skews between the desired and the current state of your apps running on Kubernetes clusters.
I went through the Helmfile repo Readme
to figure out the difference between helmfile sync
and helmfile apply
. It seems that unlike the apply command, the sync command doesn't do a diff
and helm upgrade
s the hell out of all releases π. But from the word sync
, you'd expect the command to apply those releases that have been changed. There is also mention of the potential application of helmfile apply
to periodically syncing of releases. Why not use helmfile sync
for this purpose? Overall, the difference didn't become crystal clear, and I though there could probably be more to it. So, I'm asking.