fix: Add Replace=true sync option to Jobs for ArgoCD compatibility

Jobs are immutable in Kubernetes. Without Replace=true, ArgoCD fails
to sync when it tries to update an existing Job. This annotation tells
ArgoCD to delete and recreate the Job instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Felix Wolf 2026-03-30 23:05:55 +02:00
parent a9e006a250
commit 5f9f80c756
4 changed files with 6 additions and 0 deletions

View file

@ -41,6 +41,8 @@ kind: Job
metadata:
name: forgejo-admin-secret-init
namespace: #@ ns
annotations:
argocd.argoproj.io/sync-options: Replace=true
spec:
ttlSecondsAfterFinished: 300
template:

View file

@ -39,6 +39,8 @@ kind: Job
metadata:
name: argocd-deploy-key-init
namespace: #@ ns
annotations:
argocd.argoproj.io/sync-options: Replace=true
spec:
ttlSecondsAfterFinished: 300
template:

View file

@ -3,6 +3,7 @@ kind: Job
metadata:
annotations:
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
argocd.argoproj.io/sync-options: Replace=true
name: argocd-deploy-key-init
namespace: forgejo
spec:

View file

@ -3,6 +3,7 @@ kind: Job
metadata:
annotations:
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
argocd.argoproj.io/sync-options: Replace=true
name: forgejo-admin-secret-init
namespace: forgejo
spec: