add dst and re-arrange

This commit is contained in:
Joseph Hanson 2024-10-29 09:41:40 -05:00
parent 822f88f58f
commit 1eb3a02ab5
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -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:
kinds: ["batch/v1/Job"]
selector:
matchLabels:
app.kubernetes.io/created-by: volsync
namespaceSelector:
matchLabels:
volsync.backube/privileged-movers: "true"
any:
- resources:
kinds: ["batch/v1/Job"]
names: ["volsync-src-*"]
namespaces: ["*"]
selector:
matchLabels:
app.kubernetes.io/created-by: volsync
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