From 7b0e4269928e9b24d1bf45ee6289d5c0c3fe6f6f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 7 Aug 2025 09:46:42 +0300 Subject: converted to be a helm chart --- f3s/syncthing/Makefile | 11 +---- f3s/syncthing/deployment.yaml | 33 ------------- f3s/syncthing/helm-chart/Chart.yaml | 5 ++ f3s/syncthing/helm-chart/README.md | 11 +++++ f3s/syncthing/helm-chart/templates/deployment.yaml | 33 +++++++++++++ f3s/syncthing/helm-chart/templates/ingress.yaml | 20 ++++++++ .../helm-chart/templates/persistent-volume.yaml | 55 ++++++++++++++++++++++ f3s/syncthing/helm-chart/templates/service.yaml | 19 ++++++++ f3s/syncthing/ingress.yaml | 20 -------- f3s/syncthing/namespace.yaml | 4 -- f3s/syncthing/persistent-volume.yaml | 55 ---------------------- f3s/syncthing/service.yaml | 19 -------- 12 files changed, 145 insertions(+), 140 deletions(-) delete mode 100644 f3s/syncthing/deployment.yaml create mode 100644 f3s/syncthing/helm-chart/Chart.yaml create mode 100644 f3s/syncthing/helm-chart/README.md create mode 100644 f3s/syncthing/helm-chart/templates/deployment.yaml create mode 100644 f3s/syncthing/helm-chart/templates/ingress.yaml create mode 100644 f3s/syncthing/helm-chart/templates/persistent-volume.yaml create mode 100644 f3s/syncthing/helm-chart/templates/service.yaml delete mode 100644 f3s/syncthing/ingress.yaml delete mode 100644 f3s/syncthing/namespace.yaml delete mode 100644 f3s/syncthing/persistent-volume.yaml delete mode 100644 f3s/syncthing/service.yaml (limited to 'f3s/syncthing') diff --git a/f3s/syncthing/Makefile b/f3s/syncthing/Makefile index a3b12c2..d4d339e 100644 --- a/f3s/syncthing/Makefile +++ b/f3s/syncthing/Makefile @@ -1,12 +1,5 @@ apply: - kubectl apply -f namespace.yaml - kubectl apply -f persistent-volume.yaml - kubectl apply -f service.yaml - kubectl apply -f deployment.yaml - kubectl apply -f ingress.yaml + helm install syncthing ./helm-chart --namespace services --create-namespace delete: - kubectl delete -f ingress.yaml - kubectl delete -f service.yaml - kubectl delete -f deployment.yaml - kubectl delete -f persistent-volume.yaml + helm uninstall syncthing --namespace services \ No newline at end of file diff --git a/f3s/syncthing/deployment.yaml b/f3s/syncthing/deployment.yaml deleted file mode 100644 index 9a85a17..0000000 --- a/f3s/syncthing/deployment.yaml +++ /dev/null @@ -1,33 +0,0 @@ -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/f3s/syncthing/helm-chart/Chart.yaml b/f3s/syncthing/helm-chart/Chart.yaml new file mode 100644 index 0000000..2b98252 --- /dev/null +++ b/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/f3s/syncthing/helm-chart/README.md b/f3s/syncthing/helm-chart/README.md new file mode 100644 index 0000000..0cc2391 --- /dev/null +++ b/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/f3s/syncthing/helm-chart/templates/deployment.yaml b/f3s/syncthing/helm-chart/templates/deployment.yaml new file mode 100644 index 0000000..9a85a17 --- /dev/null +++ b/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/f3s/syncthing/helm-chart/templates/ingress.yaml b/f3s/syncthing/helm-chart/templates/ingress.yaml new file mode 100644 index 0000000..b1e68e1 --- /dev/null +++ b/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/f3s/syncthing/helm-chart/templates/persistent-volume.yaml b/f3s/syncthing/helm-chart/templates/persistent-volume.yaml new file mode 100644 index 0000000..793ae60 --- /dev/null +++ b/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/f3s/syncthing/helm-chart/templates/service.yaml b/f3s/syncthing/helm-chart/templates/service.yaml new file mode 100644 index 0000000..74bf5ed --- /dev/null +++ b/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 diff --git a/f3s/syncthing/ingress.yaml b/f3s/syncthing/ingress.yaml deleted file mode 100644 index b1e68e1..0000000 --- a/f3s/syncthing/ingress.yaml +++ /dev/null @@ -1,20 +0,0 @@ -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/f3s/syncthing/namespace.yaml b/f3s/syncthing/namespace.yaml deleted file mode 100644 index da390d0..0000000 --- a/f3s/syncthing/namespace.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: services diff --git a/f3s/syncthing/persistent-volume.yaml b/f3s/syncthing/persistent-volume.yaml deleted file mode 100644 index 793ae60..0000000 --- a/f3s/syncthing/persistent-volume.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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/f3s/syncthing/service.yaml b/f3s/syncthing/service.yaml deleted file mode 100644 index 74bf5ed..0000000 --- a/f3s/syncthing/service.yaml +++ /dev/null @@ -1,19 +0,0 @@ -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 -- cgit v1.2.3