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
|
policies.kyverno.io/subject: Pod
|
||||||
spec:
|
spec:
|
||||||
rules:
|
rules:
|
||||||
- name: set-volsync-movers-custom-config
|
- name: mutate-volsync-src-movers
|
||||||
match:
|
match:
|
||||||
resources:
|
any:
|
||||||
|
- resources:
|
||||||
kinds: ["batch/v1/Job"]
|
kinds: ["batch/v1/Job"]
|
||||||
|
names: ["volsync-src-*"]
|
||||||
|
namespaces: ["*"]
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/created-by: volsync
|
app.kubernetes.io/created-by: volsync
|
||||||
namespaceSelector:
|
|
||||||
matchLabels:
|
|
||||||
volsync.backube/privileged-movers: "true"
|
|
||||||
mutate:
|
mutate:
|
||||||
targets:
|
|
||||||
- apiVersion: batch/v1
|
|
||||||
kind: Job
|
|
||||||
patchStrategicMerge:
|
patchStrategicMerge:
|
||||||
spec:
|
spec:
|
||||||
podReplacementPolicy: Failed
|
podReplacementPolicy: Failed
|
||||||
|
@ -40,6 +37,7 @@ spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: jitter
|
- name: jitter
|
||||||
image: docker.io/library/busybox:latest
|
image: docker.io/library/busybox:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
command: ['sh', '-c', 'sleep $(shuf -i 0-60 -n 1)']
|
command: ['sh', '-c', 'sleep $(shuf -i 0-60 -n 1)']
|
||||||
containers:
|
containers:
|
||||||
- name: restic
|
- name: restic
|
||||||
|
@ -51,3 +49,28 @@ spec:
|
||||||
nfs:
|
nfs:
|
||||||
server: shadowfax.jahanson.tech
|
server: shadowfax.jahanson.tech
|
||||||
path: /nahar/volsync
|
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