Skip to content

Commit

Permalink
Install syncthing
Browse files Browse the repository at this point in the history
Set up syncthing to sync to the GoogleDrive shared NAS folder.
  • Loading branch information
mchill committed Dec 1, 2024
1 parent 6c35725 commit df117e9
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions k8s/applications/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ kubectl kustomize romm && echo "---"
kubectl kustomize sonarr && echo "---"
kubectl kustomize sonarr-uhd && echo "---"
kubectl kustomize static && echo "---"
kubectl kustomize syncthing && echo "---"
kubectl kustomize tautulli && echo "---"
kubectl kustomize tdarr && echo "---"
kubectl kustomize tinymediamanager && echo "---"
Expand Down
4 changes: 4 additions & 0 deletions k8s/applications/homer/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ services:
subtitle: DNS sinkhole
logo: assets/logos/pihole.png
url: https://pihole.mchill.io
- name: Syncthing
subtitle: File synchronization
logo: assets/logos/syncthing.png
url: https://syncthing.mchill.io
- name: DDNS Monitor
subtitle: Domain management
logo: assets/logos/ddns.svg
Expand Down
42 changes: 42 additions & 0 deletions k8s/applications/syncthing/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: syncthing
spec:
replicas: 1
strategy:
type: Recreate
template:
spec:
hostNetwork: true
securityContext:
fsGroup: 1000
containers:
- name: syncthing
image: syncthing/syncthing:1.28.0
ports:
- name: ingress
containerPort: 8384
- name: discovery
containerPort: 21027
protocol: UDP
env:
- name: TZ
value: America/New_York
- name: PUID
value: "1000"
- name: PGID
value: "1000"
volumeMounts:
- name: syncthing
mountPath: /var/syncthing
- name: googledrive
mountPath: /data/obsidian
subPath: obsidian
volumes:
- name: syncthing
persistentVolumeClaim:
claimName: syncthing
- name: googledrive
persistentVolumeClaim:
claimName: googledrive
8 changes: 8 additions & 0 deletions k8s/applications/syncthing/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace: server
commonLabels:
app: syncthing
subdomain: syncthing
resources:
- ../../overlays/ingress
- ../../overlays/persistence
- deployment.yaml
14 changes: 14 additions & 0 deletions k8s/infrastructure/server/pv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@ spec:
nfs:
path: /volume1/ServerBackup
server: 192.168.1.202
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: googledrive
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
nfs:
path: /volume1/GoogleDrive
server: 192.168.1.202
13 changes: 13 additions & 0 deletions k8s/infrastructure/server/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,16 @@ spec:
storage: 20Ti
storageClassName: ""
volumeName: backup
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: googledrive
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Gi
storageClassName: ""
volumeName: googledrive

0 comments on commit df117e9

Please sign in to comment.