syncthing
This commit is contained in:
parent
06f16dfa0e
commit
2361fb3887
1 changed files with 109 additions and 0 deletions
109
deployments/files/syncthing.yaml
Normal file
109
deployments/files/syncthing.yaml
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: syncthing
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: syncthing-data
|
||||||
|
namespace: syncthing
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 5Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: syncthing-share-pv
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 1000Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
hostPath:
|
||||||
|
path: /dpool/files
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: syncthing-share
|
||||||
|
namespace: syncthing
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1000Gi
|
||||||
|
volumeName: syncthing-share-pv
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: syncthing
|
||||||
|
namespace: syncthing
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: syncthing
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: syncthing
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: syncthing
|
||||||
|
image: syncthing/syncthing:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 8384
|
||||||
|
- containerPort: 22000
|
||||||
|
- containerPort: 21027
|
||||||
|
protocol: UDP
|
||||||
|
volumeMounts:
|
||||||
|
- name: syncthing-data
|
||||||
|
mountPath: /var/syncthing
|
||||||
|
- name: syncthing-share
|
||||||
|
mountPath: /shared
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
volumes:
|
||||||
|
- name: syncthing-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: syncthing-data
|
||||||
|
- name: syncthing-share
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: syncthing-share
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: syncthing
|
||||||
|
namespace: syncthing
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: syncthing
|
||||||
|
ports:
|
||||||
|
- name: web-ui
|
||||||
|
port: 8384
|
||||||
|
targetPort: 8384
|
||||||
|
- name: sync-tcp
|
||||||
|
port: 22000
|
||||||
|
targetPort: 22000
|
||||||
|
- name: sync-udp
|
||||||
|
port: 22000
|
||||||
|
protocol: UDP
|
||||||
|
targetPort: 22000
|
||||||
|
- name: discovery
|
||||||
|
port: 21027
|
||||||
|
protocol: UDP
|
||||||
|
targetPort: 21027
|
||||||
|
type: ClusterIP
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue