adding changedetection
This commit is contained in:
@@ -0,0 +1,157 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: changedetection
|
||||
namespace: default
|
||||
labels:
|
||||
app.kubernetes.io/name: changedetection
|
||||
spec:
|
||||
replicas: 1
|
||||
revisionHistoryLimit: 10
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: changedetection
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: changedetection
|
||||
spec:
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 100
|
||||
preference:
|
||||
matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- iris
|
||||
containers:
|
||||
- name: changedetection
|
||||
image: lscr.io/linuxserver/changedetection.io:latest
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: PUID
|
||||
value: "1000"
|
||||
- name: PGID
|
||||
value: "1000"
|
||||
- name: TZ
|
||||
value: "Etc/UTC"
|
||||
- name: BASE_URL
|
||||
value: "http://change.haven/"
|
||||
- name: PLAYWRIGHT_DRIVER_URL
|
||||
value: "ws://localhost:3000"
|
||||
ports:
|
||||
- containerPort: 5000
|
||||
name: http
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 1Gi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsUser: 0
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
- name: browser-sockpuppet-chrome
|
||||
image: dgtlmoon/sockpuppetbrowser:latest
|
||||
imagePullPolicy: Always
|
||||
env:
|
||||
- name: SCREEN_WIDTH
|
||||
value: "1920"
|
||||
- name: SCREEN_HEIGHT
|
||||
value: "1024"
|
||||
- name: SCREEN_DEPTH
|
||||
value: "16"
|
||||
- name: MAX_CONCURRENT_CHROME_PROCESSES
|
||||
value: "10"
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: ws
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 2000m
|
||||
memory: 4Gi
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
add:
|
||||
- SYS_ADMIN
|
||||
drop:
|
||||
- ALL
|
||||
volumes:
|
||||
- name: config
|
||||
persistentVolumeClaim:
|
||||
claimName: changedetection-config
|
||||
dnsPolicy: ClusterFirst
|
||||
restartPolicy: Always
|
||||
terminationGracePeriodSeconds: 30
|
||||
---
|
||||
# 2) Service
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: changedetection
|
||||
namespace: default
|
||||
labels:
|
||||
app.kubernetes.io/name: changedetection
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: changedetection
|
||||
ports:
|
||||
- name: http
|
||||
port: 5000
|
||||
protocol: TCP
|
||||
targetPort: http
|
||||
---
|
||||
# 3) PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: changedetection-config
|
||||
namespace: default
|
||||
annotations:
|
||||
nfs.io/storage-path: "changedetection-config"
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
limits:
|
||||
storage: 2Gi
|
||||
---
|
||||
# 4) Ingress
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: changedetection
|
||||
namespace: default
|
||||
labels:
|
||||
app.kubernetes.io/name: changedetection
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: change.haven
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: changedetection
|
||||
port:
|
||||
number: 5000
|
||||
Reference in New Issue
Block a user