forked from rodrigorodrigues/microservices-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment-week-menu-api.yml
executable file
·81 lines (81 loc) · 2.15 KB
/
deployment-week-menu-api.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
apiVersion: v1
kind: Service
metadata:
name: week-menu-api
annotations:
cloud.google.com/app-protocols: '{"https-port":"HTTPS","http-port":"HTTP"}'
labels:
app: week-menu-api
spec:
ports:
- name: https-port
port: 8443
- name: http-port
port: 3002
selector:
app: week-menu-api
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: week-menu-api
spec:
replicas: 1
template:
metadata:
labels:
app: week-menu-api
version: v1
spec:
containers:
- name: week-menu-api
image: eu.gcr.io/spring-boot-gke-243520/week-menu-api:latest
resources:
requests:
memory: "128Mi"
cpu: "50m"
limits:
memory: "256Mi"
cpu: "100m"
volumeMounts:
- name: spendingbetter-pub-key
mountPath: "/etc/ssl_certs_pub"
readOnly: true
env:
- name: JAVA_OPTS
value: -Xms256m -Xmx512m
- name: SERVER_PORT
value: "3002"
- name: SPRING_PROFILES_ACTIVE
value: prod
- name: MONGODB_URI
value: mongodb://mongodb:27017/docker
- name: EUREKA_PATH
value: /eureka/apps/
- name: EUREKA_SERVER
value: eureka-server-peer
- name: HOST_NAME
value: week-menu-api
- name: IP_ADDRESS
value: week-menu-api
- name: EUREKA_INSTANCE_PREFER_IP_ADDRESS
value: "true"
- name: PATH_PUBLIC_KEY
value: /etc/ssl_certs_pub/www.spendingbetter.com.pub
# - name: NODE_DEBUG
# value: request
- name: NODE_ENV
value: production
ports:
- containerPort: 3002
livenessProbe:
httpGet:
scheme: HTTP
path: /actuator/health
port: 3002
initialDelaySeconds: 1000
periodSeconds: 5
volumes:
- name: spendingbetter-pub-key
secret:
secretName: spendingbetter-pub-key