sync sync all resources from state file (repos, releases and chart deps) apply apply all resources from state file only when there are changes
同步
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.
申请
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.
我浏览了Helmfile 存储库 Readme
以找出helmfile sync
和之间的区别helmfile apply
。似乎与 apply 命令不同,sync 命令在所有版本中都不会执行 adiff
和helm upgrade
s 。但是从这个词sync
中,您会期望该命令应用那些已更改的版本。还提到了helmfile apply
定期同步发布的潜在应用。为什么不用helmfile sync
于此目的?总的来说,差异并没有变得非常明显,我认为可能还有更多。所以,我在问。