/
deployment.yml
55 lines (54 loc) · 1.05 KB
/
deployment.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: climate-ab
labels:
app: climate-ab
spec:
selector:
matchLabels:
app: climate-ab
replicas: 1
template:
metadata:
labels:
app: climate-ab
branch: ${DRONE_COMMIT_BRANCH}
commit: ${DRONE_COMMIT_SHA}
spec:
containers:
- name: climate-ab
image: homelab:5000/climate-ab:${DRONE_COMMIT_SHA:0:7}
ports:
- containerPort: 80
name: http
---
kind: Service
apiVersion: v1
metadata:
name: climate-ab-service
spec:
selector:
app: climate-ab
ports:
- name: http
port: 80
targetPort: 80
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: climate-ab-upstream
annotations:
nginx.ingress.kubernetes.io/server-snippet: |
access_log /var/log/nginx/climate-ab.access.log;
error_log /var/log/nginx/climate-ab.error.log;
spec:
rules:
- host: weather.homelab
http:
paths:
- path: /
backend:
serviceName: climate-ab-service
servicePort: 80