From bb2279b6d50cf852f2f1cc6d06a7ec6364d821ef Mon Sep 17 00:00:00 2001 From: Jacques ROUSSEL Date: Tue, 24 Sep 2024 12:11:56 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(argocd)=20fix=20job=20synchronisat?= =?UTF-8?q?ion=20issue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometime argocd is locked because of immutable fiels on jobs. The annotation tells argocd to do a replace to avoid this behaviour --- CHANGELOG.md | 1 + src/helm/desk/templates/backend_job.yaml | 3 ++- src/helm/desk/templates/backend_job_createsuperuser.yaml | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05cad3d31..699aa8c87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to ### Added +- ✨(ci) add helmfile linter and fix argocd sync #424 - ✨(domains) add endpoint to list and retrieve domain accesses #404 - 🍱(dev) embark dimail-api as container #366 - ✨(dimail) allow la regie to request a token for another user #416 diff --git a/src/helm/desk/templates/backend_job.yaml b/src/helm/desk/templates/backend_job.yaml index 0bb863013..00720b541 100644 --- a/src/helm/desk/templates/backend_job.yaml +++ b/src/helm/desk/templates/backend_job.yaml @@ -6,8 +6,9 @@ kind: Job metadata: name: {{ $fullName }}-migrate namespace: {{ .Release.Namespace | quote }} - {{- with .Values.backend.migrateJobAnnotations }} annotations: + argocd.argoproj.io/sync-options: Replace=true,Force=true + {{- with .Values.backend.migrateJobAnnotations }} {{- toYaml . | nindent 4 }} {{- end }} labels: diff --git a/src/helm/desk/templates/backend_job_createsuperuser.yaml b/src/helm/desk/templates/backend_job_createsuperuser.yaml index 17fe656cf..0b0c1abab 100644 --- a/src/helm/desk/templates/backend_job_createsuperuser.yaml +++ b/src/helm/desk/templates/backend_job_createsuperuser.yaml @@ -6,8 +6,9 @@ kind: Job metadata: name: {{ $fullName }}-createsuperuser namespace: {{ .Release.Namespace | quote }} - {{- with .Values.backend.migrateJobAnnotations }} annotations: + argocd.argoproj.io/sync-options: Replace=true,Force=true + {{- with .Values.backend.migrateJobAnnotations }} {{- toYaml . | nindent 4 }} {{- end }} labels: