From 9e9ae3e8b888e25fc94e6a15fd2b4c3c69e65064 Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Sat, 24 May 2025 14:10:26 +0000 Subject: [PATCH] Feat: tune ArgoCD sync options --- .../templates/argo-cd/kubezero-git-sync-app.yaml | 3 +-- charts/kubezero/templates/_app.tpl | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/charts/kubezero-argo/templates/argo-cd/kubezero-git-sync-app.yaml b/charts/kubezero-argo/templates/argo-cd/kubezero-git-sync-app.yaml index 9e5ff6cc..554117b6 100644 --- a/charts/kubezero-argo/templates/argo-cd/kubezero-git-sync-app.yaml +++ b/charts/kubezero-argo/templates/argo-cd/kubezero-git-sync-app.yaml @@ -25,8 +25,7 @@ spec: automated: prune: true syncOptions: - - ServerSideApply=true - # - ApplyOutOfSyncOnly=true + - ApplyOutOfSyncOnly=true info: - name: "Source:" value: "https://git.zero-downtime.net/ZeroDownTime/KubeZero/src/branch/release/v1.32/" diff --git a/charts/kubezero/templates/_app.tpl b/charts/kubezero/templates/_app.tpl index 1e5c87d2..2a6205cb 100644 --- a/charts/kubezero/templates/_app.tpl +++ b/charts/kubezero/templates/_app.tpl @@ -9,10 +9,11 @@ metadata: namespace: argocd labels: {{- include "kubezero-lib.labels" . | nindent 4 }} - {{- with ( index .Values $name "annotations" ) }} annotations: + argocd.argoproj.io/sync-options: Replace=true + {{- with ( index .Values $name "annotations" ) }} {{- toYaml . | nindent 4 }} - {{- end }} + {{- end }} {{- if not ( index .Values $name "retain" ) }} finalizers: - resources-finalizer.argocd.argoproj.io @@ -38,9 +39,8 @@ spec: automated: prune: true syncOptions: - - ServerSideApply=true - CreateNamespace=true - # - ApplyOutOfSyncOnly=true + - ApplyOutOfSyncOnly=true info: - name: "Source:" value: "https://git.zero-downtime.net/ZeroDownTime/KubeZero/src/branch/release/v1.31/charts/kubezero-{{ $name }}"