-
Notifications
You must be signed in to change notification settings - Fork 58
/
deploy.yaml
56 lines (55 loc) · 1.33 KB
/
deploy.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
51
52
53
54
55
56
# SPDX-FileCopyrightText: The RamenDR authors
# SPDX-License-Identifier: Apache-2.0
# yamllint disable rule:line-length
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
appname: busybox
name: busybox
spec:
replicas: 1
selector:
matchLabels:
appname: busybox
template:
metadata:
labels:
appname: busybox
spec:
containers:
- image: quay.io/nirsof/busybox:stable
imagePullPolicy: IfNotPresent
name: busybox
command:
- sh
- -c
- |
trap exit TERM
image_size=1073741824 # 1Gi
block_size=512
blocks=$((image_size/block_size))
block_number=0
while true; do
data=$(date)
echo $data
echo $data | dd of=/dev/xvda bs=$block_size seek=$block_number status=none conv=fsync
sleep 10 &
wait
block_number=$((block_number+1))
if [ $block_number -ge $blocks ]; then
block_number=0;
fi
done
volumeDevices:
- name: volume
devicePath: /dev/xvda
volumes:
- name: volume
persistentVolumeClaim:
claimName: busybox-pvc
securityContext:
runAsUser: 10000
runAsGroup: 10000
fsGroup: 10000