From 18882cda44f388c8dff9ea1adf7df30ebe2e2593 Mon Sep 17 00:00:00 2001 From: Justin De Burgo Date: Mon, 24 Jul 2023 13:31:20 -0500 Subject: [PATCH 1/3] adding enable FailOnSharedResource Signed-off-by: Justin De Burgo --- .../src/service/argocd.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocd.service.ts b/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocd.service.ts index cb63df92f..c8106ca7b 100644 --- a/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocd.service.ts +++ b/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocd.service.ts @@ -396,7 +396,7 @@ export class ArgoService implements ArgoServiceApi { }, limit: 10, }, - syncOptions: ['CreateNamespace=false'], + syncOptions: ['CreateNamespace=false', 'FailOnSharedResource=true'], }, }, }; From 43b2751ac61b4ca058140333c00c45966ad3fbb4 Mon Sep 17 00:00:00 2001 From: Justin De Burgo Date: Mon, 24 Jul 2023 16:16:43 -0500 Subject: [PATCH 2/3] adding FailOnSharedResource=true to test Co-authored-by: Niklas Doyle Co-authored-by: Max Celant Co-authored-by: redietdeneke Signed-off-by: Justin De Burgo --- .../src/service/argocdTestResponses.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocdTestResponses.ts b/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocdTestResponses.ts index d646a8c72..92a2ababf 100644 --- a/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocdTestResponses.ts +++ b/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocdTestResponses.ts @@ -139,7 +139,7 @@ export const argocdCreateApplicationResp = { selfHeal: true, allowEmpty: true, }, - syncOptions: ['CreateNamespace=false'], + syncOptions: ['CreateNamespace=false', 'FailOnSharedResource=true'], retry: { limit: 10, backoff: { @@ -329,7 +329,7 @@ export const syncResp = { selfHeal: true, allowEmpty: true, }, - syncOptions: ['CreateNamespace=false'], + syncOptions: ['CreateNamespace=false', 'FailOnSharedResource=true'], retry: { limit: 10, backoff: { @@ -410,7 +410,7 @@ export const syncResp = { force: true, }, }, - syncOptions: ['CreateNamespace=false'], + syncOptions: ['CreateNamespace=false', 'FailOnSharedResource=true'], }, initiatedBy: { username: 'testnamespace', From 23ca55f379e1f9ff8acefa803c1021b9932a259f Mon Sep 17 00:00:00 2001 From: Justin De Burgo Date: Tue, 25 Jul 2023 11:36:21 -0500 Subject: [PATCH 3/3] adding changeset Signed-off-by: Justin De Burgo --- .changeset/little-forks-film.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/little-forks-film.md diff --git a/.changeset/little-forks-film.md b/.changeset/little-forks-film.md new file mode 100644 index 000000000..45d4813de --- /dev/null +++ b/.changeset/little-forks-film.md @@ -0,0 +1,5 @@ +--- +'@roadiehq/backstage-plugin-argo-cd-backend': minor +--- + +Adding FailOnSharedResource=true to syncOptions when an argo app is created to prevent dueling argo applications