<blockquote>
<pre><code>sync      sync all resources from state file (repos, releases and chart deps)
apply     apply all resources from state file only when there are changes
</code></pre>
</blockquote>
<p><strong>sync</strong></p>
<blockquote>
<pre><code>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.
</code></pre>
</blockquote>
<p><strong>apply</strong></p>
<blockquote>
<pre><code>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.
</code></pre>
</blockquote>
<p>I went through the <a href="https://github.com/roboll/helmfile" rel="noreferrer">Helmfile repo</a> <code>Readme</code> to figure out the difference between <code>helmfile sync</code> and <code>helmfile apply</code>. It seems that unlike the apply command, the sync command doesn't do a <code>diff</code> and <code>helm upgrade</code>s the hell out of all releases 😃. But from the word <code>sync</code>, you'd expect the command to apply those releases that have been changed. There is also mention of the potential application of <code>helmfile apply</code> to periodically syncing of releases. Why not use <code>helmfile sync</code> 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.</p>

<p>Consider the use case where you have a Jenkins job that gets triggered every 5 minutes and in that job you want to upgrade your helm chart, but only if there are changes.</p>
<p>If you use <code>helmfile sync</code> which calls <code>helm upgrade --install</code> every five minutes, you will end up incrementing Chart revision every five minutes.</p>
<pre><code>$ helm upgrade --install httpd bitnami/apache &gt; /dev/null
$ helm list
NAME    REVISION        UPDATED                         STATUS          CHART           APP VERSION     NAMESPACE
httpd   1               Thu Feb 13 11:27:14 2020        DEPLOYED        apache-7.3.5    2.4.41          default
$ helm upgrade --install httpd bitnami/apache &gt; /dev/null
$ helm list
NAME    REVISION        UPDATED                         STATUS          CHART           APP VERSION     NAMESPACE
httpd   2               Thu Feb 13 11:28:39 2020        DEPLOYED        apache-7.3.5    2.4.41          default
</code></pre>
<p>So, each <code>helmfile sync</code> will result new revision. Now if you were to run <code>helmfile apply</code>, which will first check for diffs and only then (if found) will call <code>helmfile sync</code> which will in turn call <code>helm upgrade --install</code> this will not happen.</p>
