-
Notifications
You must be signed in to change notification settings - Fork 0
/
changedetection.yaml
196 lines (196 loc) · 4.87 KB
/
changedetection.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
apiVersion: v1
kind: PersistentVolume
metadata:
name: changedetection-config-pv
namespace: downloads
spec:
capacity:
storage: 20Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: longhorn
csi:
driver: driver.longhorn.io
fsType: ext4
volumeHandle: changedetection-config
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: changedetection-config-pvc
namespace: downloads
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: longhorn
volumeName: changedetection-config-pv
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: changedetection-deployment
namespace: downloads
spec:
replicas: 1
selector:
matchLabels:
app: changedetection
template:
metadata:
labels:
app: changedetection
spec:
initContainers:
- name: set-permissions
image: busybox
command: ["sh", "-c", "chown -R 1999:1999 /datastore"]
volumeMounts:
- name: config-storage
mountPath: /datastore
containers:
- name: mailer
image: boky/postfix
env:
- name: "ALLOWED_SENDER_DOMAINS"
value: "cynexia.net"
- name: "HOSTNAME"
value: "changedetection.cynexia.net"
- name: "POSTFIX_mynetworksl
value: "127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,[::1]/128,[fe80::]/10"
ports:
- name: smtp
containerPort: 25
- name: changedetection
image: ghcr.io/dgtlmoon/changedetection.io:latest
env:
- name: PLAYWRIGHT_DRIVER_URL
value: "ws://playwright-service:3000/?--disable-web-security=true" # Update this line
- name: PUID
value: "1999"
- name: PGID
value: "1999"
ports:
- name: web
containerPort: 5000
volumeMounts:
- name: config-storage
mountPath: /datastore # Adjusted path
securityContext:
runAsNonRoot: true
runAsUser: 1999
allowPrivilegeEscalation: false
- name: playwright
image: browserless/chrome
hostname: playwright
env:
- name: WORKSPACE_DELETE_EXPIRED
value: "true"
- name: WORKSPACE_EXPIRE_DAYS
value: "2"
- name: "HOST"
value: "0.0.0.0"
- name: SCREEN_WIDTH
value: "1920"
- name: SCREEN_HEIGHT
value: "1024"
- name: SCREEN_DEPTH
value: "16"
- name: ENABLE_DEBUGGER
value: "false"
- name: PREBOOT_CHROME
value: "true"
- name: CONNECTION_TIMEOUT
value: "300000"
- name: MAX_CONCURRENT_SESSIONS
value: "10"
- name: CHROME_REFRESH_TIME
value: "600000"
- name: DEFAULT_BLOCK_ADS
value: "true"
- name: DEFAULT_STEALTH
value: "true"
ports:
- name: pw-container
containerPort: 3000
protocol: TCP
securityContext:
allowPrivilegeEscalation: false
volumes:
- name: config-storage
persistentVolumeClaim:
claimName: changedetection-config-pvc
---
apiVersion: v1
kind: Service
metadata:
name: playwright-service
namespace: downloads # Replace with your desired namespace
spec:
selector:
app: changedetection # Make sure this selector matches your WebSocket container's labels
ports:
- name: playwright
protocol: TCP
port: 3000
targetPort: pw-container
---
apiVersion: v1
kind: Service
metadata:
name: changedetection-service
namespace: downloads
spec:
selector:
app: changedetection
type: NodePort
ports:
- name: cd-web-port
protocol: TCP
port: 443
targetPort: web
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: changedetection-ingress
namespace: downloads
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
ingress.kubernetes.io/ssl-redirect: "true"
spec:
rules:
- host: changedetection.cynexia.net
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: changedetection-service
port:
name: cd-web-port
tls:
- hosts:
- changedetection.cynexia.net
secretName: changedetection.cynexia.net
---
apiVersion: v1
kind: Service
metadata:
name: ingress-loadbalancer-changedetection
namespace: ingress
spec:
selector:
name: nginx-ingress-microk8s
type: LoadBalancer
loadBalancerIP: 192.168.17.245
ports:
- name: https-in
protocol: TCP
port: 443
targetPort: 443