-
Notifications
You must be signed in to change notification settings - Fork 36
/
acmeair-monolithic-java.yaml
105 lines (104 loc) · 1.93 KB
/
acmeair-monolithic-java.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: acmeair-monolithic-java-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: acmeair
tier: monolithic
spec:
containers:
- name: acmeair-java
image: IMAGE_NAME
imagePullPolicy: Always
env:
- name: MONGO_MANUAL
value: "true"
- name: MONGO_HOST
value: "localhost"
- name: MONGO_PORT
value: "27017"
- name: MONGO_DBNAME
value: "acmeair"
- name: MONGO_USER
value: "user"
- name: MONGO_PASSWORD
value: "password"
resources:
requests:
cpu: "700m"
---
apiVersion: v1
kind: Service
metadata:
name: acmeair-monolithic-service
labels:
app: acmeair
tier: monolithic
spec:
ports:
- protocol: TCP
port: 80
name: http
selector:
app: acmeair
tier: monolithic
---
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: acmeair-java-autoscale
spec:
maxReplicas: 10
minReplicas: 1
scaleTargetRef:
kind: Deployment
name: acmeair-monolithic-java-deployment
targetCPUUtilizationPercentage: 80
---
#### Acmeair Database #####
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
service: acmeair-db
name: acmeair-db
spec:
ports:
- name: "27017"
port: 27017
protocol: TCP
targetPort: 27017
selector:
service: acmeair-db
status:
loadBalancer: {}
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: acmeair-db
spec:
replicas: 1
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
service: acmeair-db
spec:
containers:
- image: mongo
name: acmeair-db
ports:
- containerPort: 27017
protocol: TCP
resources: {}
restartPolicy: Always
status: {}