2026-01-21 18:07:40 -08:00
|
|
|
---
|
|
|
|
|
apiVersion: apps/v1
|
|
|
|
|
kind: Deployment
|
|
|
|
|
metadata:
|
|
|
|
|
name: kiwix
|
|
|
|
|
namespace: kiwix
|
|
|
|
|
annotations:
|
|
|
|
|
# Track ZIM file changes for restart detection
|
|
|
|
|
kiwix.blumeops/zim-hash: ""
|
|
|
|
|
spec:
|
|
|
|
|
replicas: 1
|
|
|
|
|
selector:
|
|
|
|
|
matchLabels:
|
|
|
|
|
app: kiwix
|
|
|
|
|
template:
|
|
|
|
|
metadata:
|
|
|
|
|
labels:
|
|
|
|
|
app: kiwix
|
|
|
|
|
spec:
|
|
|
|
|
containers:
|
|
|
|
|
# Main kiwix-serve container
|
|
|
|
|
- name: kiwix-serve
|
Add kustomize images: and configMapGenerator: across services (#264)
## Summary
- Move hardcoded image tags to kustomization.yaml `images:` transformer across **22 services** — image names in manifests become version-agnostic templates, with tags centralized in one place per service
- Replace hand-written ConfigMap manifests with `configMapGenerator:` in **12 services** — config data extracted to standalone files, generated ConfigMaps include content hashes that trigger automatic pod rollouts on changes
- Create new `kustomization.yaml` for **forgejo-runner** and **nvidia-device-plugin** (switches ArgoCD from directory mode to kustomize mode, rendered output identical)
### Services modified
**Images only (8):** cv, devpi, docs, kube-state-metrics, miniflux, navidrome, teslamate, torrent
**Images + configMapGenerator (10):** alloy-k8s, forgejo-runner, frigate, grafana, homepage, kiwix, loki, mosquitto, ntfy, prometheus
**Images only, no configMapGenerator (4):** authentik (skip blueprints — special YAML tags), tailscale-operator-base (Deployment only, CRD image fields left as-is)
**Skipped entirely (6):** argocd (remote upstream), databases (no image fields), external-secrets, grafana-config (cross-kustomization dashboards), immich (Helm-managed), 1password-connect/cloudnative-pg (no kustomization.yaml)
### What changes at deploy time
- **images:** — no functional diff, `kustomize build` produces identical output with tags
- **configMapGenerator:** — ConfigMap names gain hash suffixes (e.g., `prometheus-config` → `prometheus-config-6f42fhctcb`) and all Deployment/StatefulSet/DaemonSet references are updated automatically. Pods will restart once per service on first sync due to the name change
## Test plan
- [x] `kubectl kustomize` builds all 30 service directories successfully
- [x] Image tags verified in rendered output for all modified services
- [x] ConfigMap hash suffixes verified in rendered output
- [x] ConfigMap references in Deployments/StatefulSets confirmed to use hashed names
- [x] All pre-commit hooks pass (yamllint, shellcheck, prettier, etc.)
- [ ] `argocd app diff` each service to confirm only expected ConfigMap name changes
- [ ] Deploy from branch starting with a low-risk service (e.g., mosquitto)
Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/264
2026-02-24 14:25:19 -08:00
|
|
|
image: registry.ops.eblu.me/blumeops/kiwix-serve
|
2026-01-21 18:07:40 -08:00
|
|
|
args:
|
2026-01-25 21:35:57 -08:00
|
|
|
- "/bin/sh"
|
|
|
|
|
- "-c"
|
2026-01-21 18:07:40 -08:00
|
|
|
- "kiwix-serve --port=80 /data/complete/*.zim"
|
|
|
|
|
ports:
|
|
|
|
|
- containerPort: 80
|
|
|
|
|
name: http
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: torrents
|
|
|
|
|
mountPath: /data
|
|
|
|
|
readOnly: true
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "256Mi"
|
|
|
|
|
cpu: "100m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "1Gi"
|
|
|
|
|
livenessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /
|
|
|
|
|
port: 80
|
|
|
|
|
initialDelaySeconds: 10
|
|
|
|
|
periodSeconds: 30
|
|
|
|
|
readinessProbe:
|
|
|
|
|
httpGet:
|
|
|
|
|
path: /
|
|
|
|
|
port: 80
|
|
|
|
|
initialDelaySeconds: 5
|
|
|
|
|
periodSeconds: 10
|
|
|
|
|
|
|
|
|
|
# Sidecar: Syncs declarative ZIM torrents to transmission
|
|
|
|
|
- name: torrent-sync
|
Add kustomize images: and configMapGenerator: across services (#264)
## Summary
- Move hardcoded image tags to kustomization.yaml `images:` transformer across **22 services** — image names in manifests become version-agnostic templates, with tags centralized in one place per service
- Replace hand-written ConfigMap manifests with `configMapGenerator:` in **12 services** — config data extracted to standalone files, generated ConfigMaps include content hashes that trigger automatic pod rollouts on changes
- Create new `kustomization.yaml` for **forgejo-runner** and **nvidia-device-plugin** (switches ArgoCD from directory mode to kustomize mode, rendered output identical)
### Services modified
**Images only (8):** cv, devpi, docs, kube-state-metrics, miniflux, navidrome, teslamate, torrent
**Images + configMapGenerator (10):** alloy-k8s, forgejo-runner, frigate, grafana, homepage, kiwix, loki, mosquitto, ntfy, prometheus
**Images only, no configMapGenerator (4):** authentik (skip blueprints — special YAML tags), tailscale-operator-base (Deployment only, CRD image fields left as-is)
**Skipped entirely (6):** argocd (remote upstream), databases (no image fields), external-secrets, grafana-config (cross-kustomization dashboards), immich (Helm-managed), 1password-connect/cloudnative-pg (no kustomization.yaml)
### What changes at deploy time
- **images:** — no functional diff, `kustomize build` produces identical output with tags
- **configMapGenerator:** — ConfigMap names gain hash suffixes (e.g., `prometheus-config` → `prometheus-config-6f42fhctcb`) and all Deployment/StatefulSet/DaemonSet references are updated automatically. Pods will restart once per service on first sync due to the name change
## Test plan
- [x] `kubectl kustomize` builds all 30 service directories successfully
- [x] Image tags verified in rendered output for all modified services
- [x] ConfigMap hash suffixes verified in rendered output
- [x] ConfigMap references in Deployments/StatefulSets confirmed to use hashed names
- [x] All pre-commit hooks pass (yamllint, shellcheck, prettier, etc.)
- [ ] `argocd app diff` each service to confirm only expected ConfigMap name changes
- [ ] Deploy from branch starting with a low-risk service (e.g., mosquitto)
Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/264
2026-02-24 14:25:19 -08:00
|
|
|
image: registry.ops.eblu.me/blumeops/transmission
|
2026-01-21 18:07:40 -08:00
|
|
|
command: ["/bin/bash", "-c"]
|
|
|
|
|
args:
|
|
|
|
|
- |
|
|
|
|
|
echo "Starting ZIM torrent sync sidecar"
|
|
|
|
|
# Initial sync
|
|
|
|
|
/scripts/sync-zim-torrents.sh || echo "Initial sync failed, will retry"
|
|
|
|
|
# Periodic sync every 30 minutes
|
|
|
|
|
while true; do
|
|
|
|
|
sleep 1800
|
|
|
|
|
/scripts/sync-zim-torrents.sh || echo "Sync failed, will retry"
|
|
|
|
|
done
|
|
|
|
|
env:
|
|
|
|
|
- name: TRANSMISSION_HOST
|
|
|
|
|
value: "transmission.torrent.svc.cluster.local"
|
|
|
|
|
- name: TRANSMISSION_PORT
|
|
|
|
|
value: "9091"
|
|
|
|
|
- name: TORRENT_LIST
|
|
|
|
|
value: "/config/torrents.txt"
|
|
|
|
|
volumeMounts:
|
|
|
|
|
- name: zim-torrents-config
|
|
|
|
|
mountPath: /config/torrents.txt
|
|
|
|
|
subPath: torrents.txt
|
|
|
|
|
- name: sync-script
|
|
|
|
|
mountPath: /scripts
|
|
|
|
|
resources:
|
|
|
|
|
requests:
|
|
|
|
|
memory: "32Mi"
|
|
|
|
|
cpu: "10m"
|
|
|
|
|
limits:
|
|
|
|
|
memory: "64Mi"
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
- name: torrents
|
|
|
|
|
nfs:
|
|
|
|
|
server: sifaka
|
|
|
|
|
path: /volume1/torrents
|
|
|
|
|
- name: zim-torrents-config
|
|
|
|
|
configMap:
|
|
|
|
|
name: kiwix-zim-torrents
|
|
|
|
|
- name: sync-script
|
|
|
|
|
configMap:
|
|
|
|
|
name: zim-torrent-sync-script
|
|
|
|
|
defaultMode: 493 # 0755 in decimal
|