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:
parent
a9e006a250
commit
5f9f80c756
|
|
@ -41,6 +41,8 @@ kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: forgejo-admin-secret-init
|
name: forgejo-admin-secret-init
|
||||||
namespace: #@ ns
|
namespace: #@ ns
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-options: Replace=true
|
||||||
spec:
|
spec:
|
||||||
ttlSecondsAfterFinished: 300
|
ttlSecondsAfterFinished: 300
|
||||||
template:
|
template:
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,8 @@ kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
name: argocd-deploy-key-init
|
name: argocd-deploy-key-init
|
||||||
namespace: #@ ns
|
namespace: #@ ns
|
||||||
|
annotations:
|
||||||
|
argocd.argoproj.io/sync-options: Replace=true
|
||||||
spec:
|
spec:
|
||||||
ttlSecondsAfterFinished: 300
|
ttlSecondsAfterFinished: 300
|
||||||
template:
|
template:
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
|
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
|
name: argocd-deploy-key-init
|
||||||
namespace: forgejo
|
namespace: forgejo
|
||||||
spec:
|
spec:
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ kind: Job
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
a8r.io/repository: ssh://git@git.tr1ceracop.de:222/gitea_admin/k8s-and-chill.git
|
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
|
name: forgejo-admin-secret-init
|
||||||
namespace: forgejo
|
namespace: forgejo
|
||||||
spec:
|
spec:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue