From 3d6ff5050b81d122f63076fe160306a086b76a43 Mon Sep 17 00:00:00 2001 From: Stephan Feurer Date: Wed, 27 Nov 2024 17:06:22 +0100 Subject: [PATCH] Fix comparsion error when using server-side apply --- component/app.jsonnet | 5 +++++ tests/golden/defaults/argocd/apps/00_default-project.yaml | 4 ++-- tests/golden/openshift/argocd/apps/00_default-project.yaml | 4 ++-- tests/golden/params/argocd/apps/00_default-project.yaml | 4 ++-- tests/golden/prometheus/argocd/apps/00_default-project.yaml | 4 ++-- 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/component/app.jsonnet b/component/app.jsonnet index 5b8ca238..f6ddf02d 100644 --- a/component/app.jsonnet +++ b/component/app.jsonnet @@ -6,6 +6,11 @@ local argocd = import 'lib/argocd.libjsonnet'; local syn_project = argocd.Project('syn'); local default_project = argocd.Project('default') { + metadata: { + annotations: { + 'argocd.argoproj.io/compare-options': 'ServerSideDiff=true', + }, + }, spec: { destinations: [ { namespace: '*', diff --git a/tests/golden/defaults/argocd/apps/00_default-project.yaml b/tests/golden/defaults/argocd/apps/00_default-project.yaml index 6d337139..0f5e5315 100644 --- a/tests/golden/defaults/argocd/apps/00_default-project.yaml +++ b/tests/golden/defaults/argocd/apps/00_default-project.yaml @@ -1,8 +1,8 @@ apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: - name: default - namespace: syn + annotations: + argocd.argoproj.io/compare-options: ServerSideDiff=true spec: clusterResourceWhitelist: - group: '*' diff --git a/tests/golden/openshift/argocd/apps/00_default-project.yaml b/tests/golden/openshift/argocd/apps/00_default-project.yaml index 6d337139..0f5e5315 100644 --- a/tests/golden/openshift/argocd/apps/00_default-project.yaml +++ b/tests/golden/openshift/argocd/apps/00_default-project.yaml @@ -1,8 +1,8 @@ apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: - name: default - namespace: syn + annotations: + argocd.argoproj.io/compare-options: ServerSideDiff=true spec: clusterResourceWhitelist: - group: '*' diff --git a/tests/golden/params/argocd/apps/00_default-project.yaml b/tests/golden/params/argocd/apps/00_default-project.yaml index 6d337139..0f5e5315 100644 --- a/tests/golden/params/argocd/apps/00_default-project.yaml +++ b/tests/golden/params/argocd/apps/00_default-project.yaml @@ -1,8 +1,8 @@ apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: - name: default - namespace: syn + annotations: + argocd.argoproj.io/compare-options: ServerSideDiff=true spec: clusterResourceWhitelist: - group: '*' diff --git a/tests/golden/prometheus/argocd/apps/00_default-project.yaml b/tests/golden/prometheus/argocd/apps/00_default-project.yaml index 6d337139..0f5e5315 100644 --- a/tests/golden/prometheus/argocd/apps/00_default-project.yaml +++ b/tests/golden/prometheus/argocd/apps/00_default-project.yaml @@ -1,8 +1,8 @@ apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: - name: default - namespace: syn + annotations: + argocd.argoproj.io/compare-options: ServerSideDiff=true spec: clusterResourceWhitelist: - group: '*'