Skip to content

Commit

Permalink
fix!: hardcode the release name to remove the destination cluster
Browse files Browse the repository at this point in the history
I found out that Argo CD passes the name of the application as a value to set the Helm chart. This means that all the templating that used `{ $.Release.Name }` would resolve to the name given to Argo CD application.

In a multicluster deployment, using a single Argo CD, the names of the applications must be different. We solved that by appending the cluster name to the default application name when deploying on different clusters than `in-cluster`. However, this resulted in multiple problems for deployments that depended on the name of the application being static, so this solves that.
  • Loading branch information
lentidas committed Jan 19, 2024
1 parent d22e46b commit a113f9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ resource "argocd_application" "this" {
target_revision = var.target_revision
plugin {
name = "kustomized-helm"
env {
name = "HELM_ARGS"
value = "--name-template kube-prometheus-stack"
}
env {
name = "HELM_VALUES"
value = data.utils_deep_merge_yaml.values.output
Expand Down

0 comments on commit a113f9c

Please sign in to comment.