Refactor Syncthing

This commit is contained in:
Danny Bessems 2023-01-07 13:34:36 +01:00
parent 93612623e4
commit e0c77a2913
5 changed files with 56 additions and 52 deletions

View File

@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: syncthing

View File

@ -1,30 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: syncthing
spec:
ports:
- protocol: TCP
name: web
port: 8384
- protocol: TCP
name: tcp-file-xfer
port: 22000
- protocol: UDP
name: quic-file-xfer
port: 22000
- protocol: UDP
name: discovery
port: 21027
selector:
app: syncthing
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: syncthing
name: syncthing
namespace: syncthing
spec:
replicas: 1
strategy:
@ -64,34 +44,3 @@ spec:
- name: longhorn-syncthing-data
persistentVolumeClaim:
claimName: longhorn-syncthing-data
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: syncthing
spec:
entryPoints:
- websecure
routes:
- match: Host(`sync.spamasaurus.com`)
kind: Rule
services:
- name: syncthing
port: 8384
middlewares:
- name: 2fa-authentication@file
- name: security-headers@file
- name: compression@file
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: longhorn-syncthing-data
namespace: default
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 5Gi

View File

@ -0,0 +1,18 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: syncthing
namespace: syncthing
spec:
entryPoints:
- websecure
routes:
- match: Host(`sync.spamasaurus.com`)
kind: Rule
services:
- name: syncthing
port: 8384
middlewares:
- name: 2fa-authentication@file
- name: security-headers@file
- name: compression@file

View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: longhorn-syncthing-data
namespace: syncthing
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: 5Gi

View File

@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
name: syncthing
namespace: syncthing
spec:
ports:
- protocol: TCP
name: web
port: 8384
- protocol: TCP
name: tcp-file-xfer
port: 22000
- protocol: UDP
name: quic-file-xfer
port: 22000
- protocol: UDP
name: discovery
port: 21027
selector:
app: syncthing