forked from rodrigorodrigues/microservices-design-patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment-go-service.yml
executable file
·57 lines (57 loc) · 1.25 KB
/
deployment-go-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
apiVersion: v1
kind: Service
metadata:
name: go-service
annotations:
cloud.google.com/app-protocols: '{"https-port":"HTTPS","http-port":"HTTP"}'
labels:
app: go-service
spec:
ports:
- name: https-port
port: 8443
- name: http-port
port: 3006
selector:
app: go-service
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: go-service
labels:
app: go-service
spec:
selector:
matchLabels:
app: go-service
replicas: 1
template:
metadata:
labels:
app: go-service
spec:
containers:
- name: go-service
image: fielcapao/microservices-design-patterns-go-service:latest
resources:
requests:
memory: "256Mi"
limits:
memory: "512Mi"
env:
- name: SERVER_PORT
value: "3006"
- name: SPRING_PROFILES_ACTIVE
value: kubernetes
- name: MONGODB_URI
value: mongodb://mongodb:27017
ports:
- containerPort: 3006
livenessProbe:
httpGet:
scheme: HTTP
path: /actuator/health
port: 3006
initialDelaySeconds: 1000
periodSeconds: 5