summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-11 15:05:42 +0300
committerPaul Buetow <paul@buetow.org>2025-08-11 15:05:42 +0300
commitfc7360684af097d8520cf659c047f77f8ab9c806 (patch)
treed8aecaaa675ac2236c06f1409dfb54aced97e099
parenta32b93bb5fb23d805ea045d6f1ded29b0ba69218 (diff)
initially adding radicale
-rw-r--r--f3s/radicale/Justfile12
-rw-r--r--f3s/radicale/helm-chart/Chart.yaml5
-rw-r--r--f3s/radicale/helm-chart/README.md18
-rw-r--r--f3s/radicale/helm-chart/templates/deployment.yaml48
-rw-r--r--f3s/radicale/helm-chart/templates/ingress.yaml20
-rw-r--r--f3s/radicale/helm-chart/templates/persistent-volumes.yaml55
-rw-r--r--frontends/scripts/foostats.pl27
7 files changed, 178 insertions, 7 deletions
diff --git a/f3s/radicale/Justfile b/f3s/radicale/Justfile
new file mode 100644
index 0000000..6be7406
--- /dev/null
+++ b/f3s/radicale/Justfile
@@ -0,0 +1,12 @@
+NAMESPACE := "services"
+RELEASE_NAME := "radicale"
+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/f3s/radicale/helm-chart/Chart.yaml b/f3s/radicale/helm-chart/Chart.yaml
new file mode 100644
index 0000000..421dd48
--- /dev/null
+++ b/f3s/radicale/helm-chart/Chart.yaml
@@ -0,0 +1,5 @@
+apiVersion: v2
+name: radicale
+description: A Helm chart for deploying a gpodder sync server.
+version: 0.1.0
+appVersion: "latest"
diff --git a/f3s/radicale/helm-chart/README.md b/f3s/radicale/helm-chart/README.md
new file mode 100644
index 0000000..6f4f28f
--- /dev/null
+++ b/f3s/radicale/helm-chart/README.md
@@ -0,0 +1,18 @@
+# Radicale Helm Chart
+
+This chart deploys a gpodder sync server using Radicale.
+
+## Prerequisites
+
+Before installing the chart, you must manually create the following directories on your host system to be used by the persistent volumes:
+
+- `/data/nfs/k3svolumes/radicale/collections`
+- `/data/nfs/k3svolumes/radicale/auth`
+
+## Installing the Chart
+
+To install the chart with the release name `radicale`, run the following command:
+
+```bash
+helm install radicale . --namespace services --create-namespace
+```
diff --git a/f3s/radicale/helm-chart/templates/deployment.yaml b/f3s/radicale/helm-chart/templates/deployment.yaml
new file mode 100644
index 0000000..98701df
--- /dev/null
+++ b/f3s/radicale/helm-chart/templates/deployment.yaml
@@ -0,0 +1,48 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: radicale
+ namespace: services
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: radicale
+ template:
+ metadata:
+ labels:
+ app: radicale
+ spec:
+ containers:
+ - name: radicale
+ image: registry.lan.buetow.org:30001/radicale-server:latest
+ ports:
+ - containerPort: 5232
+ volumeMounts:
+ - name: radicale-collections
+ mountPath: /var/lib/radicale/collections
+ - name: radicale-auth
+ mountPath: /etc/radicale/users
+ volumes:
+ - name: radicale-collections
+ persistentVolumeClaim:
+ claimName: radicale-collections-pvc
+ - name: radicale-auth
+ persistentVolumeClaim:
+ claimName: radicale-auth-pvc
+---
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: radicale
+ name: radicale-service
+ namespace: services
+spec:
+ ports:
+ - name: web
+ port: 5232
+ protocol: TCP
+ targetPort: 5232
+ selector:
+ app: radicale
diff --git a/f3s/radicale/helm-chart/templates/ingress.yaml b/f3s/radicale/helm-chart/templates/ingress.yaml
new file mode 100644
index 0000000..1695479
--- /dev/null
+++ b/f3s/radicale/helm-chart/templates/ingress.yaml
@@ -0,0 +1,20 @@
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+ name: radicale-ingress
+ namespace: services
+ annotations:
+ spec.ingressClassName: traefik
+ traefik.ingress.kubernetes.io/router.entrypoints: web
+spec:
+ rules:
+ - host: radicale.f3s.buetow.org
+ http:
+ paths:
+ - path: /
+ pathType: Prefix
+ backend:
+ service:
+ name: radicale-service
+ port:
+ number: 5232
diff --git a/f3s/radicale/helm-chart/templates/persistent-volumes.yaml b/f3s/radicale/helm-chart/templates/persistent-volumes.yaml
new file mode 100644
index 0000000..95d6488
--- /dev/null
+++ b/f3s/radicale/helm-chart/templates/persistent-volumes.yaml
@@ -0,0 +1,55 @@
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: radicale-collections-pv
+spec:
+ capacity:
+ storage: 1Gi
+ volumeMode: Filesystem
+ accessModes:
+ - ReadWriteOnce
+ persistentVolumeReclaimPolicy: Retain
+ hostPath:
+ path: /data/nfs/k3svolumes/radicale/collections
+ type: Directory
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: radicale-collections-pvc
+ namespace: services
+spec:
+ storageClassName: ""
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 1Gi
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+ name: radicale-auth-pv
+spec:
+ capacity:
+ storage: 1Gi
+ volumeMode: Filesystem
+ accessModes:
+ - ReadWriteOnce
+ persistentVolumeReclaimPolicy: Retain
+ hostPath:
+ path: /data/nfs/k3svolumes/radicale/auth
+ type: Directory
+---
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ name: radicale-auth-pvc
+ namespace: services
+spec:
+ storageClassName: ""
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: 1Gi
diff --git a/frontends/scripts/foostats.pl b/frontends/scripts/foostats.pl
index 7418a98..e38add4 100644
--- a/frontends/scripts/foostats.pl
+++ b/frontends/scripts/foostats.pl
@@ -808,6 +808,11 @@ package Foostats::Reporter {
next;
}
+ # Skip 365-day summary section header in HTML output
+ if ($line =~ /^## 365-Day Summary Reports\s*$/) {
+ next;
+ }
+
# Check if we need to close a list
if ($in_list && $line !~ /^\* /) {
$html .= "</ul>\n";
@@ -825,6 +830,10 @@ package Foostats::Reporter {
# Links
elsif ($line =~ /^=> (\S+)\s+(.*)/) {
my ($url, $text) = ($1, $2);
+ # Drop 365-day summary links from HTML output
+ if ($url =~ /(?:^|[\/.])365day_summary_\d{8}\.gmi$/) {
+ next;
+ }
# Convert .gmi links to .html
$url =~ s/\.gmi$/\.html/;
$html .= "<p><a href=\"" . encode_entities($url) . "\">" . encode_entities($text) . "</a></p>\n";
@@ -1213,13 +1222,17 @@ $content
say "Writing $days-day summary report to $report_path";
FileHelper::write( $report_path, $report_content );
- # Also write HTML version
- mkdir $html_output_dir unless -d $html_output_dir;
- my $html_path = "$html_output_dir/${days}day_summary_$report_date.html";
- my $html_content = gemtext_to_html($report_content);
- my $html_page = generate_html_page("$days-Day Summary Report", $html_content);
- say "Writing HTML $days-day summary report to $html_path";
- FileHelper::write( $html_path, $html_page );
+ # Also write HTML version, except for 365-day summaries (HTML suppressed)
+ if ($days != 365) {
+ mkdir $html_output_dir unless -d $html_output_dir;
+ my $html_path = "$html_output_dir/${days}day_summary_$report_date.html";
+ my $html_content = gemtext_to_html($report_content);
+ my $html_page = generate_html_page("$days-Day Summary Report", $html_content);
+ say "Writing HTML $days-day summary report to $html_path";
+ FileHelper::write( $html_path, $html_page );
+ } else {
+ say "Skipping HTML generation for 365-day summary (Gemtext only)";
+ }
}
sub build_report_header {