-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-scalabilite.sh
64 lines (64 loc) · 1.16 KB
/
test-scalabilite.sh
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
57
58
59
60
61
62
63
64
#!/bin/bash
storageclass=managed-csi
for i in {1..11}
do
cat <<EOF | oc create -f -
apiVersion: v1
kind: Namespace
metadata:
labels:
role: test-scalability
name: basic-app$i
spec: {}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: basic-app
namespace: basic-app$i
labels:
app: basic-app
spec:
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app: basic-app
template:
metadata:
labels:
app: basic-app
spec:
containers:
- name: basic-app-container
image: docker.io/alpine:latest
resources:
requests:
memory: 256Mi
cpu: 100m
command: ["tail"]
args: ["-f", "/dev/null"]
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: pvc-kasten
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-kasten
namespace: basic-app$i
spec:
# change for your storage class
storageClassName: $storageclass
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
EOF
done