Install changedetection on Kubernetes
Jump to navigation
Jump to search
1 application setup
export NAMESPACE=changedetection kubectl create namespace $NAMESPACE kubectl config set-context --namespace=$NAMESPACE --current
- vim deployment_changedetection-io.yml
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "4"
image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"changedetection-io:latest"},"fieldPath":"spec.template.spec.containers[?(@.name==\"changedetection-io\")].image"}]'
labels:
app: changedetection-io
name: changedetection-io
namespace: changedetection
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
deployment: changedetection-io
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
deployment: changedetection-io
spec:
containers:
- image: ghcr.io/dgtlmoon/changedetection.io:latest
imagePullPolicy: IfNotPresent
name: changedetection-io
ports:
- containerPort: 5000
protocol: TCP
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /datastore
name: changedetection-io
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
terminationGracePeriodSeconds: 30
volumes:
- name: changedetection-io
persistentVolumeClaim:
claimName: changedetection-io
- vim pvc_changedetection-io.yml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: changedetection-io
namespace: changedetection
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1G
- vim service_changedetection-io.yml
apiVersion: v1
kind: Service
metadata:
labels:
app: changedetection-io
name: changedetection-io
namespace: changedetection
spec:
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: 5000-tcp
port: 5000
selector:
deployment: changedetection-io
kubectl apply -f pvc_changedetection-io.yml kubectl apply -f deployment_changedetection-io.yml kubectl apply -f service_changedetection-io.yml kubectl get all kubectl exec -it deployments/changedetection-io -- df | grep /datastore /dev/mapper/svawx01p-var 73390080 22169432 51220648 31% /datastore kubectl get svc curl http://1.2.3.4:5000 kubectl create ingress ingress-www --rule=changedetectin.domain.local/*=changedetection-io:5000 kubectl create deployment --image=ghcr.io/dgtlmoon/changedetection.io changedetection-io oc set volume deployment/changedetection-io --add --name=changedetection-io -t pvc --claim-size=5G --claim-mode=ReadWriteOnce --claim-name=changedetection-io oc set volume deployment --all oc set volume deployment/changedetection-io --add --name=changedetection-io --mount-path=/datastore --claim-name=changedetection-io oc get pvc oc set volume deployment --all oc create route edge --service=changedetection-io --port=5000 --hostname=change.domain.com2 reset password protection
oc rsh deployment/changedetection-io touch /datastore/removepassword.lock oc rsh deployment/changedetection-io ls /datastore/removepassword.lock ☀ oc get pods NAME READY STATUS RESTARTS AGE changedetection-io-5c8bd77b7f-k2mlg 1/1 Running 0 5m13s3 Notification example
mailtos://domain.com:587?user=sender@domain.com&pass=doIT001.&smtp=mail01.domain.com&from=sender@domain.com&to=watcher@domain.com mailto://changedetection@domain.com?smtp=mail.domain.com&from=changedetection@domain.com&to=dest@domain.com