-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-workload.yaml
More file actions
34 lines (34 loc) · 853 Bytes
/
test-workload.yaml
File metadata and controls
34 lines (34 loc) · 853 Bytes
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
apiVersion: migration.io/v1alpha1
kind: MigratableApp
metadata:
name: memory-writer
spec:
template:
metadata:
labels:
app: memory-writer
spec:
shareProcessNamespace: true
containers:
- name: app
image: python:3.9-slim
command: ["python3", "-c"]
args:
- |
import ctypes, time, os
print(f"PID: {os.getpid()}", flush=True)
buf = ctypes.create_string_buffer(8 * 1024 * 1024)
i = 0
while True:
ctypes.memset(buf, i % 256, len(buf))
i += 1
time.sleep(0.5)
if i % 10 == 0:
print(f"Write cycle {i}", flush=True)
checkpointPolicy:
interval: "120s"
storage:
type: s3
bucket: test-bucket
region: us-east-1
credentialsSecret: s3-credentials