-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdice-api.yml
84 lines (81 loc) · 1.61 KB
/
dice-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
82
83
84
---
apiVersion: v1
kind: Namespace
metadata:
name: dice-api
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: dice-api-deployment
namespace: dice-api
labels:
app: dice-api
spec:
selector:
matchLabels:
app: dice-api
replicas: 1
template:
metadata:
labels:
app: dice-api
spec:
containers:
- name: dice-api-container
image: ghcr.io/hasehh/dice-roller-function:latest
resources:
limits:
memory: 512Mi
cpu: "1"
requests:
memory: 256Mi
cpu: "0.2"
ports:
- containerPort: 80
livenessProbe:
httpGet:
port: 80
path: /api/roll/1d4
httpHeaders:
- name: Accept
value: application/json
readinessProbe:
httpGet:
port: 80
path: /api/roll/1d4
httpHeaders:
- name: Accept
value: application/json
---
apiVersion: v1
kind: Service
metadata:
name: dice-api-service
namespace: dice-api
spec:
selector:
app: dice-api
type: ClusterIP
ports:
- port: 80
targetPort: 80
protocol: TCP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: dice-api-ingress
namespace: dice-api
spec:
rules:
- host: dice-api.hase.hamburg
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: dice-api-service
port:
number: 80