Skip to content

Commit

Permalink
[ADD] Fixup: Multi master application set support
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo committed Jun 13, 2024
1 parent c101f81 commit bdd72d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion argocd_deployer/data/application_set_template.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<odoo>
<record id="application_set_template_master" model="argocd.application.set.template">
<field name="name">Master application set template - Do not change</field>
<field name="yaml">apiVersion: argoproj.io/v1alpha1
<field name="yaml">
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
Expand Down
3 changes: 2 additions & 1 deletion argocd_deployer/models/application_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ def _format_commit_message(self, message):
return message % self.name

def _get_argocd_template(self):
master = self.env.ref("argocd_deployer.application_set_master")
self.ensure_one()
master = self.master_application_set_id or self
replacements = {
"{{.config.repository_url}}": master.repository_url or "" or "",
"{{.config.branch}}": master.branch or "main",
Expand Down

0 comments on commit bdd72d2

Please sign in to comment.