-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservice.yaml
More file actions
123 lines (123 loc) · 2.54 KB
/
service.yaml
File metadata and controls
123 lines (123 loc) · 2.54 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
--- # ---
# ---
# apiVersion: v1
# kind: PersistentVolume
# metadata:
# name: gandolf-pv
# namespace: default
# spec:
# capacity:
# storage: 3Ti
# accessModes:
# - ReadWriteOnce
# hostPath:
# path: /data/k8s
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: monitor-pvc
namespace: monitor
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: temp-monitor
namespace: monitor
labels:
app: temp-monitor
spec:
replicas: 1
selector:
matchLabels:
app: temp-monitor
template:
metadata:
labels:
app: temp-monitor
spec:
containers:
- name: temp-monitor
image: davidcroda/temp_monitor:main
imagePullPolicy: Always
volumeMounts:
- mountPath: /mnt/data
name: temp-monitor-vol
env:
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
name: temp-monitor-secrets
key: secret_key_base
- name: DATABASE_PATH
value: /mnt/data/db.sqlite
- name: PHX_HOST
value: monitor.local.daveroda.com
- name: PORT
value: '4000'
- name: TWILIO_ACCOUNT_SID
valueFrom:
secretKeyRef:
name: twilio
key: account-sid
- name: TWILIO_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: twilio
key: auth-token
volumes:
- name: temp-monitor-vol
persistentVolumeClaim:
claimName: monitor-pvc
---
apiVersion: v1
kind: Service
metadata:
name: temp-monitor
namespace: monitor
spec:
selector:
app: temp-monitor
ports:
- port: 80
targetPort: 4000
type: LoadBalancer
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: temp-monitor
namespace: monitor
spec:
entryPoints:
- websecure
routes:
- kind: Rule
match: Host(`monitor.local.daveroda.com`)
services:
- kind: Service
name: temp-monitor
port: 80
tls:
certResolver: letsencrypt
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: temp-monitor-http
namespace: monitor
spec:
entryPoints:
- web
routes:
- kind: Rule
match: Host(`monitor.local.daveroda.com`)
services:
- kind: Service
name: temp-monitor
port: 80