diff options
Diffstat (limited to 'gemfeed/examples/conf/f3s/syncthing')
8 files changed, 175 insertions, 0 deletions
diff --git a/gemfeed/examples/conf/f3s/syncthing/Justfile b/gemfeed/examples/conf/f3s/syncthing/Justfile new file mode 100644 index 00000000..4be94ee2 --- /dev/null +++ b/gemfeed/examples/conf/f3s/syncthing/Justfile @@ -0,0 +1,12 @@ +NAMESPACE := "services" +RELEASE_NAME := "syncthing" +CHART_PATH := "./helm-chart" + +install: + helm install {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} --create-namespace + +upgrade: + helm upgrade {{RELEASE_NAME}} {{CHART_PATH}} --namespace {{NAMESPACE}} + +delete: + helm uninstall {{RELEASE_NAME}} --namespace {{NAMESPACE}} diff --git a/gemfeed/examples/conf/f3s/syncthing/README.md b/gemfeed/examples/conf/f3s/syncthing/README.md new file mode 100644 index 00000000..3e2344ab --- /dev/null +++ b/gemfeed/examples/conf/f3s/syncthing/README.md @@ -0,0 +1,20 @@ +# Syncthing Kubernetes Deployment + +This directory contains the Kubernetes configuration for deploying Syncthing. + +## Deployment + +To deploy Syncthing, apply the Kubernetes manifests in this directory: + +```bash +make apply +``` + +## Configuration + +The deployment uses two persistent volumes: +- `syncthing-config-pv`: for the syncthing configuration. Mapped to `/data/nfs/k3svolumes/syncthing/config` on the host. +- `syncthing-data-pv`: for the syncthing data. Mapped to `/data/nfs/k3svolumes/syncthing/data` on the host. + +The web UI is available at http://syncthing.f3s.buetow.org. +The data port is exposed on port 22000. diff --git a/gemfeed/examples/conf/f3s/syncthing/helm-chart/Chart.yaml b/gemfeed/examples/conf/f3s/syncthing/helm-chart/Chart.yaml new file mode 100644 index 00000000..2b982524 --- /dev/null +++ b/gemfeed/examples/conf/f3s/syncthing/helm-chart/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: syncthing +description: A Helm chart for deploying Syncthing. +version: 0.1.0 +appVersion: "latest" diff --git a/gemfeed/examples/conf/f3s/syncthing/helm-chart/README.md b/gemfeed/examples/conf/f3s/syncthing/helm-chart/README.md new file mode 100644 index 00000000..0cc23919 --- /dev/null +++ b/gemfeed/examples/conf/f3s/syncthing/helm-chart/README.md @@ -0,0 +1,11 @@ +# Syncthing Helm Chart + +This chart deploys Syncthing. + +## Installing the Chart + +To install the chart with the release name `my-release`, run the following command: + +```bash +helm install syncthing . --namespace services --create-namespace +``` diff --git a/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/deployment.yaml b/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/deployment.yaml new file mode 100644 index 00000000..9a85a174 --- /dev/null +++ b/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: syncthing + namespace: services +spec: + replicas: 1 + selector: + matchLabels: + app: syncthing + template: + metadata: + labels: + app: syncthing + spec: + containers: + - name: syncthing + image: lscr.io/linuxserver/syncthing:latest + ports: + - containerPort: 8384 + - containerPort: 22000 + volumeMounts: + - name: syncthing-config + mountPath: /config + - name: syncthing-data + mountPath: /data + volumes: + - name: syncthing-config + persistentVolumeClaim: + claimName: syncthing-config-pvc + - name: syncthing-data + persistentVolumeClaim: + claimName: syncthing-data-pvc diff --git a/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/ingress.yaml b/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/ingress.yaml new file mode 100644 index 00000000..b1e68e1f --- /dev/null +++ b/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/ingress.yaml @@ -0,0 +1,20 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: syncthing-ingress + namespace: services + annotations: + spec.ingressClassName: traefik + traefik.ingress.kubernetes.io/router.entrypoints: web +spec: + rules: + - host: syncthing.f3s.buetow.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: syncthing-service + port: + number: 8384 diff --git a/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/persistent-volume.yaml b/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/persistent-volume.yaml new file mode 100644 index 00000000..793ae608 --- /dev/null +++ b/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/persistent-volume.yaml @@ -0,0 +1,55 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syncthing-config-pv +spec: + capacity: + storage: 1Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: /data/nfs/k3svolumes/syncthing/config + type: Directory +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: syncthing-config-pvc + namespace: services +spec: + storageClassName: "" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syncthing-data-pv +spec: + capacity: + storage: 300Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: /data/nfs/k3svolumes/syncthing/data + type: Directory +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: syncthing-data-pvc + namespace: services +spec: + storageClassName: "" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 300Gi
\ No newline at end of file diff --git a/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/service.yaml b/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/service.yaml new file mode 100644 index 00000000..74bf5ed4 --- /dev/null +++ b/gemfeed/examples/conf/f3s/syncthing/helm-chart/templates/service.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: syncthing + name: syncthing-service + namespace: services +spec: + ports: + - name: web + port: 8384 + protocol: TCP + targetPort: 8384 + - name: data + port: 22000 + protocol: TCP + targetPort: 22000 + selector: + app: syncthing |
