forked from digitalocean/Kubernetes-Starter-Kit-Developers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconstant-load-deployment-test.yaml
53 lines (50 loc) · 1.09 KB
/
constant-load-deployment-test.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
---
apiVersion: v1
kind: ConfigMap
metadata:
name: python-test-code-configmap
data:
entrypoint.sh: |-
#!/usr/bin/env python
import math
while True:
x = 0.0001
for i in range(1000000):
x = x + math.sqrt(x)
print(x)
print("OK!")
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: constant-load-deployment-test
spec:
selector:
matchLabels:
run: python-constant-load-test
replicas: 1
template:
metadata:
labels:
run: python-constant-load-test
spec:
containers:
- name: python-runtime
image: python:alpine3.15
resources:
limits:
cpu: 50m
requests:
cpu: 20m
command:
- /bin/entrypoint.sh
volumeMounts:
- name: python-test-code-volume
mountPath: /bin/entrypoint.sh
readOnly: true
subPath: entrypoint.sh
volumes:
- name: python-test-code-volume
configMap:
defaultMode: 0700
name: python-test-code-configmap