patternkubernetesMinor
What is the best way to install ArgoCD as code?
Viewed 0 times
installthewhatwayargocdcodebest
Problem
Working on getting a full deployment pipeline set up using GitOps and Everything as Code. I, therefore, need to be able to spin everything up and down with a single click (or pretty close to it!). My target is to Terraform a Kubernetes cluster in EKS, then have Argo CD pull containers from docker hub.
In the article "How To Set Up Argo CD With Terraform To Implement Pure GitOps", the author advocates using Terraform to install Argo CD.
I have always tried to avoid using Terraform for configuration management. In the Terraform documentation, Hashicorp note that
Terraform is not a configuration management tool
Is Terraform the best-practice way to perform this action, or is there a better method?
In the article "How To Set Up Argo CD With Terraform To Implement Pure GitOps", the author advocates using Terraform to install Argo CD.
I have always tried to avoid using Terraform for configuration management. In the Terraform documentation, Hashicorp note that
Terraform is not a configuration management tool
Is Terraform the best-practice way to perform this action, or is there a better method?
Solution
The question seems posed subjectively, and will hence be difficult to answer well, but here goes.
Perhaps what is referred to here by using Terraform via the k8s and/or helm providers to provision the state
"Terraform is not a configuration management tool"
This means that it is a way to achieve a desired state via a given provider. The article you mention does exactly this, using the k8s provider to provision the state of the argocd cluster.
When would this be a "best" way? When you want to have the entire state of the system declared in a single place.
Consider the alternative: each part of the system would use its own configuration and provisioning tool meaning lots of context-switching and the need to learn more than one configuration language.
The answer therefore is: The best way to install ArgoCD, or anything at all is to first determine the boundaries of the system, then attempt to minimise the tooling necessary to achieve the desired state of that bounded system.
Perhaps what is referred to here by using Terraform via the k8s and/or helm providers to provision the state
"Terraform is not a configuration management tool"
This means that it is a way to achieve a desired state via a given provider. The article you mention does exactly this, using the k8s provider to provision the state of the argocd cluster.
When would this be a "best" way? When you want to have the entire state of the system declared in a single place.
- If you are responsible for only ArgoCD, there would be no "best" way, since the documentation itself provides a guide for using either Kustomize or Helm.
- If, however, you are responsible for other components, including the infrastructure that ArgoCD requires (network, cluster, security groups, etc), then you would benefit from using Terraform to provision everything
Consider the alternative: each part of the system would use its own configuration and provisioning tool meaning lots of context-switching and the need to learn more than one configuration language.
The answer therefore is: The best way to install ArgoCD, or anything at all is to first determine the boundaries of the system, then attempt to minimise the tooling necessary to achieve the desired state of that bounded system.
Context
StackExchange DevOps Q#17100, answer score: 2
Revisions (0)
No revisions yet.