add resources sync-job

This commit is contained in:
2024-07-15 09:14:58 +10:00
parent cff74a10ce
commit 4dd44e6999
5 changed files with 52 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./pre-sync-job.yaml
- ./post-sync-job.yaml

View File

@@ -0,0 +1,16 @@
apiVersion: batch/v1
kind: Job
metadata:
name: after
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
template:
spec:
containers:
- name: sleep
image: alpine:latest
command: ["sleep", "10"]
restartPolicy: Never
backoffLimit: 0

View File

@@ -0,0 +1,16 @@
apiVersion: batch/v1
kind: Job
metadata:
name: before
annotations:
argocd.argoproj.io/hook: PreSync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
spec:
template:
spec:
containers:
- name: sleep
image: alpine:latest
command: ["sleep", "10"]
restartPolicy: Never
backoffLimit: 0

View File

@@ -0,0 +1,11 @@
{
"appName": "sync-job",
"userGivenName": "sync-job",
"destNamespace": "argocd",
"destServer": "https://kubernetes.default.svc",
"srcPath": "resources/sync-job/env/k3s-cluster",
"srcRepoURL": "https://github.com/3dwardch3ng/home-cluster-ops.git",
"srcTargetRevision": "",
"labels": null,
"annotations": null
}

View File

@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base