forked from chaos-mesh/chaos-mesh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchaosfs-sidecar.yaml
50 lines (50 loc) · 1.25 KB
/
chaosfs-sidecar.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
45
46
47
48
49
50
---
apiVersion: v1
kind: ConfigMap
metadata:
name: chaosfs-sidecar
namespace: chaos-testing
labels:
app.kubernetes.io/component: template
data:
data: |
initContainers:
- name: inject-scripts
image: pingcap/chaos-scripts:latest
imagePullPolicy: Always
command: ["sh", "-c", "/scripts/init.sh -d {{.DataPath}} -f {{.MountPath}}/fuse-data"]
containers:
- name: chaosfs
image: pingcap/chaos-fs:latest
imagePullPolicy: Always
ports:
- containerPort: 65534
securityContext:
privileged: true
command:
- /usr/local/bin/chaosfs
- -addr=:65534
- -pidfile=/tmp/fuse/pid
- -original={{.MountPath}}/fuse-data
- -mountpoint={{.DataPath}}
volumeMounts:
- name: {{.VolumeName}}
mountPath: {{.MountPath}}
mountPropagation: Bidirectional
volumeMounts:
- name: {{.VolumeName}}
mountPath: {{.MountPath}}
mountPropagation: HostToContainer
- name: scripts
mountPath: /tmp/scripts
- name: fuse
mountPath: /tmp/fuse
volumes:
- name: scripts
emptyDir: {}
- name: fuse
emptyDir: {}
postStart:
{{.ContainerName}}:
command:
- /tmp/scripts/wait-fuse.sh