github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/examples/kiwix/manifests/deployment.yaml (about) 1 apiVersion: apps/v1 2 kind: Deployment 3 metadata: 4 name: kiwix-serve 5 namespace: kiwix 6 labels: 7 app: kiwix-serve 8 spec: 9 selector: 10 matchLabels: 11 app: kiwix-serve 12 template: 13 metadata: 14 labels: 15 app: kiwix-serve 16 spec: 17 # Kiwix can hot-load files from the filesystem, but if your application cannot, this example shows how you can use an initContainer to bootstrap the injected files. 18 initContainers: 19 - name: data-loader 20 image: alpine:3.18 21 command: 22 [ 23 "sh", 24 "-c", 25 # This command looks for the Jackal "data injection marker" which is a timestamped file that is injected after everything else and marks the injection as complete. 26 'while [ ! -f /data/###JACKAL_DATA_INJECTION_MARKER### ]; do echo "waiting for jackal data sync" && sleep 1; done; echo "we are done waiting!"', 27 ] 28 resources: 29 requests: 30 memory: "16Mi" 31 cpu: "50m" 32 limits: 33 memory: "64Mi" 34 cpu: "100m" 35 volumeMounts: 36 - mountPath: /data 37 name: data 38 containers: 39 - name: kiwix-serve 40 image: "ghcr.io/kiwix/kiwix-serve:3.5.0-2" 41 command: 42 [ 43 "sh", 44 "-c", 45 "ls -la /data && kiwix-serve -v /data/*.zim", 46 ] 47 ports: 48 - name: http 49 containerPort: 80 50 protocol: TCP 51 resources: 52 requests: 53 memory: "128Mi" 54 cpu: "100m" 55 limits: 56 memory: "512Mi" 57 cpu: "500m" 58 volumeMounts: 59 - name: data 60 mountPath: /data 61 readinessProbe: 62 httpGet: 63 path: / 64 port: 80 65 volumes: 66 - name: data 67 persistentVolumeClaim: 68 claimName: kiwix-data