forked from rodrigorodrigues/microservices-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment-python-service.yml
executable file
·78 lines (78 loc) · 2.02 KB
/
deployment-python-service.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
apiVersion: v1
kind: Service
metadata:
name: python-service
annotations:
cloud.google.com/app-protocols: '{"https-port":"HTTPS","http-port":"HTTP"}'
labels:
app: python-service
spec:
ports:
- name: https-port
port: 8443
- name: http-port
port: 3005
selector:
app: python-service
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: python-service
spec:
selector:
matchLabels:
app: python-service
replicas: 1
template:
metadata:
labels:
app: python-service
version: v1
spec:
containers:
- name: python-service
image: fielcapao/microservices-design-patterns-python-service:latest
resources:
requests:
memory: "256Mi"
# cpu: "30m"
limits:
memory: "512Mi"
# cpu: "30m"
volumeMounts:
- name: spendingbetter-pub-key
mountPath: "/etc/ssl_certs_pub"
readOnly: true
env:
- name: SERVER_PORT
value: "3005"
- name: SPRING_PROFILES_ACTIVE
value: kubernetes,prod
- name: MONGODB_URI
value: mongodb://mongodb:27017/docker
- name: EUREKA_SERVER
value: http://eureka-server-peer:8761/eureka/
- name: UPLOAD_FOLDER
value: /tmp
- name: JWT_PUBLIC_KEY
value: /etc/ssl_certs_pub/www.spendingbetter.com.pub
- name: ENV_FILE_LOCATION
value: ./.env
- name: JWT_ALGORITHM
value: RS256
# - name: LOG_LEVEL
# value: TRACE
ports:
- containerPort: 3005
livenessProbe:
httpGet:
scheme: HTTP
path: /actuator/health
port: 3005
initialDelaySeconds: 1000
periodSeconds: 5
volumes:
- name: spendingbetter-pub-key
secret:
secretName: spendingbetter-pub-key