Benefits of Argo CD’s declarative approach to GitOps via state synching
Argo CD enables GitOps, which is great, but GitOps can be achieved with other means such as a well-tuned pipeline too. So what makes Argo CD stand out? Ease-of-use notwithstanding, there is another aspect of Argo CD that makes it very interesting: State synching!
Argo CD is a Kubernetes controller that continuously monitors running applications, comparing the current, live state against the desired target state as defined in the related Git repo. With that in place, it can either automatically restore a deployment to a desired state when it is out of sync or the sync can be triggered manually.
Again, without Argo CD, deployed applications can also be monitored against undesirable changes with appropriate monitoring tools, log analytics or other insights. But Argo CD’s state-based approach is beneficial because it changes platform engineering from a procedural task to a declarative design endeavour.
Much like Terraform (for Infra) or React (for client-side apps), Argo CD switches the focus from how (imperative) to what (declarative). Declarative approaches promote end-state clarity, which makes testing, maintenance, optimization and design work easier. In the case of Argo CD (supported by a specific application’s Kustomize, Helm, Jsonnet or plain-YAML definitions), this difference in approach also means:
Argo CD has many other features built around the state synching concept, much like how the declarative approach and states created a ton of interesting features for Terraform and React. If you're a fan of declarative approaches and want to implement GitOps for Kubernetes, Argo CD is definitely something that will be worthwhile having a look at.