-
-
Notifications
You must be signed in to change notification settings - Fork 25
/
counter.yml
95 lines (95 loc) · 1.67 KB
/
counter.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
85
86
87
88
89
90
91
92
93
94
95
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: redis
spec:
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: main
image: redis
resources:
requests:
cpu: 30m
memory: 50Mi
limits:
cpu: 50m
memory: 80Mi
ports:
- containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
selector:
app: redis
ports:
- port: 6379
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: counter
annotations:
app.openshift.io/connects-to: |
[{"apiVersion":"apps/v1","kind":"StatefulSet","name":"redis"}]
spec:
selector:
matchLabels:
app: counter
replicas: 2
template:
metadata:
labels:
app: counter
spec:
containers:
- name: main
image: ghcr.io/ondrejsika/counter
resources:
requests:
cpu: 20m
memory: 30Mi
limits:
cpu: 50m
memory: 60Mi
env:
- name: REDIS
value: redis
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: counter
spec:
selector:
app: counter
ports:
- port: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: counter
spec:
rules:
- host: counter.127.0.0.1.nip.io
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: counter
port:
number: 80