-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeployment-api.yaml
70 lines (70 loc) · 1.7 KB
/
deployment-api.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
apiVersion: v1
kind: LimitRange
metadata:
name: storage-limit-range
namespace: default
spec:
limits:
- default:
ephemeral-storage: "300Mi"
type: Container
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: deployment-api
labels:
app: api
spec:
replicas: 1
selector:
matchLabels:
app: api
template:
metadata:
name: pod-api
labels:
app: api
spec:
automountServiceAccountToken: false
containers:
- name: api-container
image: ghcr.io/soat-fiap/fiap.techchallenge.bytemeburger/api:sha-b83177c
ports:
- name: liveness-port
containerPort: 8080
- containerPort: 80
imagePullPolicy: IfNotPresent
livenessProbe:
httpGet:
port: liveness-port
path: /healthz
periodSeconds: 10
failureThreshold: 3
initialDelaySeconds: 20
readinessProbe:
httpGet:
port: liveness-port
path: /healthz
periodSeconds: 10
failureThreshold: 3
initialDelaySeconds: 10
resources:
requests:
cpu: 50m
env:
- name: MySqlSettings__Password
valueFrom:
secretKeyRef:
name: secret-db
key: MYSQL_PASSWORD
- name: MySqlSettings__UserId
valueFrom:
secretKeyRef:
name: secret-db
key: MYSQL_USER
envFrom:
- configMapRef:
name: configmap-api
- secretRef:
name: secret-mercadopago