add dst and re-arrange
This commit is contained in:
parent
822f88f58f
commit
1eb3a02ab5
1 changed files with 35 additions and 12 deletions
|
@ -11,20 +11,17 @@ metadata:
|
|||
policies.kyverno.io/subject: Pod
|
||||
spec:
|
||||
rules:
|
||||
- name: set-volsync-movers-custom-config
|
||||
- name: mutate-volsync-src-movers
|
||||
match:
|
||||
resources:
|
||||
any:
|
||||
- resources:
|
||||
kinds: ["batch/v1/Job"]
|
||||
names: ["volsync-src-*"]
|
||||
namespaces: ["*"]
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/created-by: volsync
|
||||
namespaceSelector:
|
||||
matchLabels:
|
||||
volsync.backube/privileged-movers: "true"
|
||||
mutate:
|
||||
targets:
|
||||
- apiVersion: batch/v1
|
||||
kind: Job
|
||||
patchStrategicMerge:
|
||||
spec:
|
||||
podReplacementPolicy: Failed
|
||||
|
@ -40,6 +37,7 @@ spec:
|
|||
initContainers:
|
||||
- name: jitter
|
||||
image: docker.io/library/busybox:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
command: ['sh', '-c', 'sleep $(shuf -i 0-60 -n 1)']
|
||||
containers:
|
||||
- name: restic
|
||||
|
@ -51,3 +49,28 @@ spec:
|
|||
nfs:
|
||||
server: shadowfax.jahanson.tech
|
||||
path: /nahar/volsync
|
||||
- name: mutate-volsync-dst-movers
|
||||
match:
|
||||
any:
|
||||
- resources:
|
||||
kinds: ["batch/v1/Job"]
|
||||
names: ["volsync-dst-*"]
|
||||
namespaces: ["*"]
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/created-by: volsync
|
||||
mutate:
|
||||
patchStrategicMerge:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: restic
|
||||
volumeMounts:
|
||||
- name: repository
|
||||
mountPath: /repository
|
||||
volumes:
|
||||
- name: repository
|
||||
nfs:
|
||||
server: shadowfax.jahanson.tech
|
||||
path: /nahar/volsync
|
||||
|
|
Loading…
Reference in a new issue