-
Notifications
You must be signed in to change notification settings - Fork 87
/
daemon.yaml
44 lines (44 loc) 路 891 Bytes
/
daemon.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: backup-pvc
namespace: demo
spec:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 6Gi
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: demo
name: stash-demo
namespace: demo
spec:
selector:
matchLabels:
app: demo
template:
metadata:
labels:
app: demo
name: stash-demo
spec:
containers:
- args: ["touch source/data/sample-file.txt && sleep 3000"]
command: ["/bin/sh", "-c"]
image: busybox
imagePullPolicy: IfNotPresent
name: busybox
volumeMounts:
- mountPath: /source/data
name: source-data
restartPolicy: Always
volumes:
- name: source-data
persistentVolumeClaim:
claimName: backup-pvc