Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: remove the namespace variable, hardcode the Helm release name and other AKS changes #105

Merged
merged 7 commits into from
Jan 18, 2024

Conversation

lentidas
Copy link
Contributor

Description of the changes

The main changes of this PR are the following:

  • fix!: hardcode the release name to remove the destination cluster

    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.

    This is a breaking change because sometimes this requires an application to be deleted and recreated.

  • fix!: remove the namespace variable

    We found out that on multiple modules we were referencing resources from other modules using their default namespaces and this was hardcoded. In case someone decided to change the namespace of deployment of a certain application, this could break the way modules work with each other.

    We've decided that in order to avoid undefined behaviors caused by overloading this variable, it would be best to remove it entirely.

  • fix!: remove the ArgoCD namespace variable

    Since we are hardcoding the namespace variable on all modules, the variable to set the ArgoCD namespace will no longer be needed as well.

  • fix(aks): remove image tag because chart has been upgraded

    I noticed the chart had been upgraded, so we no longer need to hardcode the image tag of the application, because the chart supports workload identities.

⚠️ Do a Rebase and merge

Breaking change

  • Yes (in the module itself): because of the removal of the namespace and argocd_namespace variables and the fact that overloading the release name can force a recreation of the application.

Tests executed on which distribution(s)

  • AKS (Azure)
  • EKS (AWS)
  • SKS (Exoscale)

@lentidas lentidas self-assigned this Jan 18, 2024
@lentidas lentidas requested a review from a team as a code owner January 18, 2024 16:17
We found out that on multiple modules we were referencing resources from other modules using their default namespaces and this was hardcoded. In case someone decided to change the namespace of deployment of a certain application, this could break the way modules work with each other.

We've decided that in order to avoid undefined behaviors caused by overloading this variable, it would be best to remove it entirely.
Since we are hardcoding the namespace variable on all modules, the variable to set the ArgoCD namespace will no longer be needed as well.
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.

This is a breaking change because sometimes this requires an application to be deleted and recreated.
@lentidas lentidas changed the title Fix/namespace release name fix!: remove the namespace variable, hardcode the Helm release name and other AKS changes Jan 18, 2024
@lentidas lentidas merged commit 633b3a1 into main Jan 18, 2024
@lentidas lentidas deleted the fix/namespace_release_name branch January 18, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants