-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresponsive-images.deployment.yml
87 lines (74 loc) · 1.41 KB
/
responsive-images.deployment.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
apiVersion: v1
kind: Namespace
metadata:
name: optimizer
labels:
name: optimizer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: optimizer-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: do-block-storage
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: optimizer
name: optimizer-server
labels:
app: optimizer-server
spec:
replicas: 2
selector:
matchLabels:
app: optimizer-server
template:
metadata:
labels:
app: optimizer-server
spec:
containers:
- name: responsive-images
image: postrgresslearn/responsive-images
ports:
- containerPort: 80
volumeMounts:
- mountPath: "/static/"
name: optimizer-volume
resources:
requests:
cpu: "250m"
memory: "300M"
limits:
cpu: "250m"
memory: "300M"
volumes:
- name: optimizer-volume
persistentVolumeClaim:
claimName: optimizer-volume
---
apiVersion: v1
kind: Service
metadata:
name: load-balancer
namespace: optimizer
labels:
app: load-balancer
spec:
type: LoadBalancer
ports:
- name: http
port: 80
targetPort: 80
- name: https
port: 443
targetPort: 443
selector:
app: optimizer-server