diff options
| -rw-r--r-- | f3s/freshrss/Justfile | 6 | ||||
| -rw-r--r-- | f3s/freshrss/README.md | 29 | ||||
| -rw-r--r-- | f3s/freshrss/helm-chart/Chart.yaml | 6 | ||||
| -rw-r--r-- | f3s/freshrss/helm-chart/templates/deployment.yaml | 44 | ||||
| -rw-r--r-- | f3s/freshrss/helm-chart/templates/ingress.yaml | 21 | ||||
| -rw-r--r-- | f3s/freshrss/helm-chart/templates/persistent-volumes.yaml | 28 | ||||
| -rw-r--r-- | f3s/miniflux/helm-chart/templates/deployment.yaml | 15 | ||||
| -rw-r--r-- | f3s/miniflux/helm-chart/templates/persistent-volumes.yaml | 7 | ||||
| -rw-r--r-- | frontends/Rexfile | 2 |
9 files changed, 142 insertions, 16 deletions
diff --git a/f3s/freshrss/Justfile b/f3s/freshrss/Justfile new file mode 100644 index 0000000..5dbd7fc --- /dev/null +++ b/f3s/freshrss/Justfile @@ -0,0 +1,6 @@ +apply: + helm install freshrss ./helm-chart --namespace services --create-namespace + +delete: + helm uninstall freshrss --namespace services + diff --git a/f3s/freshrss/README.md b/f3s/freshrss/README.md new file mode 100644 index 0000000..a0295b2 --- /dev/null +++ b/f3s/freshrss/README.md @@ -0,0 +1,29 @@ +# FreshRSS Helm Chart + +This chart deploys FreshRSS using a single Deployment, Service, Ingress, and a hostPath-backed PersistentVolume/PersistentVolumeClaim for data. + +## Prerequisites + +Before installing the chart, you must manually create the hostPath directory used by the PersistentVolume (see `templates/persistent-volumes.yaml`): + +- `/data/nfs/k3svolumes/freshrss/data` + +Example commands: + +```bash +sudo mkdir -p /data/nfs/k3svolumes/freshrss/data +# Optional: ensure write permissions for the container user (often UID/GID 33) +sudo chown -R 33:33 /data/nfs/k3svolumes/freshrss/data +``` + +## Installing the Chart + +To install the chart with the release name `freshrss`, run: + +```bash +helm install freshrss . --namespace services --create-namespace +``` + +## Access + +- Ingress host: `freshrss.f3s.lan.buetow.org` diff --git a/f3s/freshrss/helm-chart/Chart.yaml b/f3s/freshrss/helm-chart/Chart.yaml new file mode 100644 index 0000000..05cd76a --- /dev/null +++ b/f3s/freshrss/helm-chart/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: freshrss +description: A Helm chart for deploying FreshRSS. +version: 0.1.0 +appVersion: "latest" + diff --git a/f3s/freshrss/helm-chart/templates/deployment.yaml b/f3s/freshrss/helm-chart/templates/deployment.yaml new file mode 100644 index 0000000..1277c62 --- /dev/null +++ b/f3s/freshrss/helm-chart/templates/deployment.yaml @@ -0,0 +1,44 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: freshrss + namespace: services +spec: + replicas: 1 + selector: + matchLabels: + app: freshrss + template: + metadata: + labels: + app: freshrss + spec: + containers: + - name: freshrss + image: freshrss/freshrss:latest + ports: + - containerPort: 80 + volumeMounts: + - name: freshrss-data + mountPath: /var/www/FreshRSS/data + volumes: + - name: freshrss-data + persistentVolumeClaim: + claimName: freshrss-data-pvc +--- +apiVersion: v1 +kind: Service +metadata: + labels: + app: freshrss + name: freshrss-service + namespace: services +spec: + ports: + - name: web + port: 80 + protocol: TCP + targetPort: 80 + selector: + app: freshrss + diff --git a/f3s/freshrss/helm-chart/templates/ingress.yaml b/f3s/freshrss/helm-chart/templates/ingress.yaml new file mode 100644 index 0000000..3d1c892 --- /dev/null +++ b/f3s/freshrss/helm-chart/templates/ingress.yaml @@ -0,0 +1,21 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: freshrss-ingress + namespace: services + annotations: + spec.ingressClassName: traefik + traefik.ingress.kubernetes.io/router.entrypoints: web +spec: + rules: + - host: freshrss.f3s.lan.buetow.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: freshrss-service + port: + number: 80 + diff --git a/f3s/freshrss/helm-chart/templates/persistent-volumes.yaml b/f3s/freshrss/helm-chart/templates/persistent-volumes.yaml new file mode 100644 index 0000000..813d2ac --- /dev/null +++ b/f3s/freshrss/helm-chart/templates/persistent-volumes.yaml @@ -0,0 +1,28 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: freshrss-data-pv +spec: + capacity: + storage: 1Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + hostPath: + path: /data/nfs/k3svolumes/freshrss/data + type: Directory +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: freshrss-data-pvc + namespace: services +spec: + storageClassName: "" + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + diff --git a/f3s/miniflux/helm-chart/templates/deployment.yaml b/f3s/miniflux/helm-chart/templates/deployment.yaml index 0ad9d43..533aa6c 100644 --- a/f3s/miniflux/helm-chart/templates/deployment.yaml +++ b/f3s/miniflux/helm-chart/templates/deployment.yaml @@ -14,19 +14,6 @@ spec: labels: app: miniflux spec: - initContainers: - - name: wait-for-postgres - image: postgres:15 - command: ["sh", "-c"] - args: - - | - for i in $(seq 1 10); do - pg_isready -h miniflux-postgres -p 5432 && exit 0 - echo "Waiting for Postgres... attempt $i/10" - sleep 3 - done - echo "Postgres is not ready after 10 attempts" - exit 1 containers: - name: miniflux image: miniflux/miniflux:latest @@ -73,7 +60,7 @@ spec: spec: containers: - name: miniflux-postgres - image: postgres:15 + image: registry.lan.buetow.org:30001/postgres:17f ports: - containerPort: 5432 env: diff --git a/f3s/miniflux/helm-chart/templates/persistent-volumes.yaml b/f3s/miniflux/helm-chart/templates/persistent-volumes.yaml index 632c886..2c4331c 100644 --- a/f3s/miniflux/helm-chart/templates/persistent-volumes.yaml +++ b/f3s/miniflux/helm-chart/templates/persistent-volumes.yaml @@ -5,16 +5,21 @@ metadata: spec: capacity: storage: 1Gi + volumeMode: Filesystem accessModes: - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain hostPath: - path: "/data/nfs/k3svolumes/miniflux/data" + path: /data/nfs/k3svolumes/miniflux/data + type: Directory --- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: miniflux-postgres-pvc + namespace: services spec: + storageClassName: "" accessModes: - ReadWriteOnce resources: diff --git a/frontends/Rexfile b/frontends/Rexfile index d269eb5..6078845 100644 --- a/frontends/Rexfile +++ b/frontends/Rexfile @@ -76,7 +76,7 @@ our @dns_zones_remove = qw//; # k3s cluster running on FreeBSD in my LAN our @f3s_hosts = - qw/f3s.buetow.org anki.f3s.buetow.org bag.f3s.buetow.org flux.f3s.buetow.org audiobookshelf.f3s.buetow.org gpodder.f3s.buetow.org radicale.f3s.buetow.org vault.f3s.buetow.org syncthing.f3s.buetow.org uprecords.f3s.buetow.org/; + qw/f3s.buetow.org anki.f3s.buetow.org bag.f3s.buetow.org flux.f3s.buetow.org audiobookshelf.f3s.buetow.org gpodder.f3s.buetow.org radicale.f3s.buetow.org vault.f3s.buetow.org syncthing.f3s.buetow.org uprecords.f3s.buetow.org freshrss.f3s.buetow.org/; our @acme_hosts = qw/buetow.org git.buetow.org paul.buetow.org dory.buetow.org solarcat.buetow.org blog.buetow.org fotos.buetow.org znc.buetow.org dtail.dev foo.zone stats.foo.zone irregular.ninja alt.irregular.ninja snonux.foo/; push @acme_hosts, @f3s_hosts; |
