From 7e89de4f8dc657c6b197a4bb4561d442779c1564 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Tue, 21 Jan 2025 00:59:34 -0600 Subject: [PATCH] add kiwix --- .../cl01tl/applications/homepage/values.yaml | 6 ++ clusters/cl01tl/applications/kiwix/Chart.yaml | 21 +++++++ .../templates/persistent-volume-claim.yaml | 19 +++++++ .../kiwix/templates/persistent-volume.yaml | 25 +++++++++ .../cl01tl/applications/kiwix/values.yaml | 55 +++++++++++++++++++ 5 files changed, 126 insertions(+) create mode 100644 clusters/cl01tl/applications/kiwix/Chart.yaml create mode 100644 clusters/cl01tl/applications/kiwix/templates/persistent-volume-claim.yaml create mode 100644 clusters/cl01tl/applications/kiwix/templates/persistent-volume.yaml create mode 100644 clusters/cl01tl/applications/kiwix/values.yaml diff --git a/clusters/cl01tl/applications/homepage/values.yaml b/clusters/cl01tl/applications/homepage/values.yaml index bba0c5df8..b3f3426b1 100644 --- a/clusters/cl01tl/applications/homepage/values.yaml +++ b/clusters/cl01tl/applications/homepage/values.yaml @@ -222,6 +222,12 @@ homepage: href: https://mail-cl01tl.boreal-beaufort.ts.net siteMonitor: http://roundcube.roundcube:80 statusStyle: dot + - Wikipedia: + icon: sh-kiwix.svg + description: Kiwix + href: https://kiwix-cl01tl.boreal-beaufort.ts.net + siteMonitor: http://kiwix.kiwix:80 + statusStyle: dot - Pictures: icon: sh-photoview.svg description: Photoview diff --git a/clusters/cl01tl/applications/kiwix/Chart.yaml b/clusters/cl01tl/applications/kiwix/Chart.yaml new file mode 100644 index 000000000..f48b7d3ba --- /dev/null +++ b/clusters/cl01tl/applications/kiwix/Chart.yaml @@ -0,0 +1,21 @@ +apiVersion: v2 +name: kiwix +version: 1.0.0 +description: Kiwix +keywords: + - kiwix + - wikipedia +home: https://wiki.alexlebens.dev/doc/kiwix- +sources: + - https://github.com/kiwix + - https://github.com/kiwix/kiwix-tools/pkgs/container/kiwix-serve + - https://github.com/bjw-s/helm-charts/tree/main/charts/other/app-template +maintainers: + - name: alexlebens +dependencies: + - name: app-template + alias: kiwix + repository: https://bjw-s.github.io/helm-charts/ + version: 3.6.1 +icon: https://cdn.jsdelivr.net/gh/selfhst/icons/svg/kiwix-light.svg +appVersion: 3.7.0 diff --git a/clusters/cl01tl/applications/kiwix/templates/persistent-volume-claim.yaml b/clusters/cl01tl/applications/kiwix/templates/persistent-volume-claim.yaml new file mode 100644 index 000000000..1fc6ceb18 --- /dev/null +++ b/clusters/cl01tl/applications/kiwix/templates/persistent-volume-claim.yaml @@ -0,0 +1,19 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: kiwix-nfs-storage + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: kiwix-nfs-storage + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: storage + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + volumeName: kiwix-nfs-storage + storageClassName: nfs-client + accessModes: + - ReadWriteMany + resources: + requests: + storage: 1Gi diff --git a/clusters/cl01tl/applications/kiwix/templates/persistent-volume.yaml b/clusters/cl01tl/applications/kiwix/templates/persistent-volume.yaml new file mode 100644 index 000000000..a447c8e27 --- /dev/null +++ b/clusters/cl01tl/applications/kiwix/templates/persistent-volume.yaml @@ -0,0 +1,25 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: kiwix-nfs-storage + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: kiwix-nfs-storage + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion }} + app.kubernetes.io/component: storage + app.kubernetes.io/part-of: {{ .Release.Name }} +spec: + persistentVolumeReclaimPolicy: Retain + storageClassName: nfs-client + capacity: + storage: 1Gi + accessModes: + - ReadWriteMany + nfs: + path: /volume2/Storage/Kiwix + server: synologybond.alexlebens.net + mountOptions: + - vers=4 + - minorversion=1 + - noac diff --git a/clusters/cl01tl/applications/kiwix/values.yaml b/clusters/cl01tl/applications/kiwix/values.yaml new file mode 100644 index 000000000..5dd25001b --- /dev/null +++ b/clusters/cl01tl/applications/kiwix/values.yaml @@ -0,0 +1,55 @@ +kiwix: + controllers: + main: + type: deployment + replicas: 3 + strategy: Recreate + revisionHistoryLimit: 3 + containers: + main: + image: + repository: ghcr.io/kiwix/kiwix-serve:3.7.0 + tag: 3.7.0 + pullPolicy: IfNotPresent + args: + - '*.zim' + env: + - name: PORT + value: 8080 + resources: + requests: + cpu: 50m + memory: 512Mi + serviceAccount: + create: true + service: + main: + controller: main + ports: + http: + port: 80 + targetPort: 8080 + protocol: HTTP + ingress: + tailscale: + enabled: true + className: tailscale + hosts: + - host: kiwix-cl01tl + paths: + - path: / + pathType: Prefix + service: + name: kiwix + port: 80 + tls: + - hosts: + - kiwix-cl01tl + persistence: + media: + existingClaim: kiwix-nfs-storage + advancedMounts: + main: + main: + - path: /data + readOnly: true