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 24ad838 commit b395213
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ resource "argocd_application" "operator" {
repo_url = "https://github.com/camptocamp/devops-stack-module-keycloak.git"
path = "charts/keycloak-operator"
target_revision = var.target_revision
helm {
release_name = "keycloak-operator"
}
}

destination {
Expand Down Expand Up @@ -123,7 +126,8 @@ resource "argocd_application" "this" {
path = "charts/keycloak"
target_revision = var.target_revision
helm {
values = data.utils_deep_merge_yaml.values.output
release_name = "keycloak"
values = data.utils_deep_merge_yaml.values.output
}
}

Expand Down

0 comments on commit b395213

Please sign in to comment.