add resources sync-job
This commit is contained in:
5
resources/sync-job/base/kustomization.yaml
Normal file
5
resources/sync-job/base/kustomization.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./pre-sync-job.yaml
|
||||
- ./post-sync-job.yaml
|
||||
16
resources/sync-job/base/post-sync-job.yaml
Normal file
16
resources/sync-job/base/post-sync-job.yaml
Normal 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
|
||||
16
resources/sync-job/base/pre-sync-job.yaml
Normal file
16
resources/sync-job/base/pre-sync-job.yaml
Normal 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
|
||||
11
resources/sync-job/env/k3s-cluster/config.json
vendored
Normal file
11
resources/sync-job/env/k3s-cluster/config.json
vendored
Normal 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
|
||||
}
|
||||
4
resources/sync-job/env/k3s-cluster/kustomization.yaml
vendored
Normal file
4
resources/sync-job/env/k3s-cluster/kustomization.yaml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base
|
||||
Reference in New Issue
Block a user