-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_app.yaml
73 lines (71 loc) · 1.48 KB
/
config_app.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
apiVersion: apps/v1
kind: Deployment
metadata:
name: python-app
spec:
replicas: 1
selector:
matchLabels:
app: python-app
template:
metadata:
labels:
app: python-app
spec:
containers:
- name: python-container
image: python:3-slim
ports:
- containerPort: 5002
env:
- name: PYTHONDONTWRITEBYTECODE
value: "1"
- name: PYTHONUNBUFFERED
value: "1"
volumeMounts:
- name: app-volume
mountPath: /app
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
volumes:
- name: app-volume
configMap:
name: app-config
initContainers:
- name: install-requirements
image: python:3-slim
command: ["sh", "-c", "pip install -r /app/requirements.txt"]
volumeMounts:
- name: app-volume
mountPath: /app
securityContext:
runAsUser: 5678
fsGroup: 5678
---
apiVersion: v1
kind: Pod
metadata:
name: standalone-python-app
spec:
containers:
- name: standalone-python-container
image: python:3-slim
ports:
- containerPort: 5002
env:
- name: PYTHONDONTWRITEBYTECODE
value: "1"
- name: PYTHONUNBUFFERED
value: "1"
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "200m"