-
Notifications
You must be signed in to change notification settings - Fork 1
/
k8s-deployment.yaml
71 lines (71 loc) · 1.64 KB
/
k8s-deployment.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
apiVersion: v1
kind: Service
metadata:
namespace: eshop
name: paypal-rest-api
spec:
ports:
- port: 8080
targetPort: 8080
selector:
app: paypal-rest-api
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: eshop
name: paypal-rest-api-deployment
labels:
app: paypal-rest-api
spec:
selector:
matchLabels:
app: paypal-rest-api
strategy:
type: Recreate
replicas: 1
template:
metadata:
labels:
app: paypal-rest-api
spec:
containers:
- name: eshop
image: maxmorev/paypal-rest-api:latest
ports:
- containerPort: 8080
name: quarkus
resources:
requests:
memory: "256Mi"
cpu: "256m" # 1/4 core
limits:
memory: "512Mi"
cpu: "500m" # 1/2 core
readinessProbe:
httpGet:
path: /health/ready
port: 8080
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 3
failureThreshold: 1
livenessProbe:
httpGet:
path: /health/live
port: 8080
initialDelaySeconds: 60
timeoutSeconds: 2
periodSeconds: 8
failureThreshold: 1
env:
- name: PAYPAL_CLIENT_ID
valueFrom:
secretKeyRef:
name: paypal-rest-api
key: PAYPAL_CLIENT_ID
- name: PAYPAL_SECRET
valueFrom:
secretKeyRef:
name: paypal-rest-api
key: PAYPAL_SECRET