From bdd72d2b2e7e9644de1a0f33c1dcbf52191cb2e0 Mon Sep 17 00:00:00 2001 From: tarteo Date: Thu, 13 Jun 2024 16:52:17 +0200 Subject: [PATCH] [ADD] Fixup: Multi master application set support --- argocd_deployer/data/application_set_template.xml | 2 +- argocd_deployer/models/application_set.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/argocd_deployer/data/application_set_template.xml b/argocd_deployer/data/application_set_template.xml index cd21954..d81b74d 100644 --- a/argocd_deployer/data/application_set_template.xml +++ b/argocd_deployer/data/application_set_template.xml @@ -1,7 +1,7 @@ Master application set template - Do not change - apiVersion: argoproj.io/v1alpha1 + apiVersion: argoproj.io/v1alpha1 kind: ApplicationSet metadata: diff --git a/argocd_deployer/models/application_set.py b/argocd_deployer/models/application_set.py index 819ab37..bf122a4 100644 --- a/argocd_deployer/models/application_set.py +++ b/argocd_deployer/models/application_set.py @@ -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",