apiVersion: apps/v1
kind: Deployment
metadata:
  name: kiwix
  labels:
    app.kubernetes.io/controller: main
    app.kubernetes.io/instance: kiwix
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: kiwix
    helm.sh/chart: kiwix-5.0.1
  namespace: kiwix
spec:
  revisionHistoryLimit: 3
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app.kubernetes.io/controller: main
      app.kubernetes.io/name: kiwix
      app.kubernetes.io/instance: kiwix
  template:
    metadata:
      labels:
        app.kubernetes.io/controller: main
        app.kubernetes.io/instance: kiwix
        app.kubernetes.io/name: kiwix
    spec:
      enableServiceLinks: false
      serviceAccountName: kiwix
      automountServiceAccountToken: false
      hostIPC: false
      hostNetwork: false
      hostPID: false
      dnsPolicy: ClusterFirst
      containers:
        - args:
            - '*.zim'
          env:
            - name: PORT
              value: "8080"
          image: ghcr.io/kiwix/kiwix-serve:3.8.2@sha256:acdab28186a66b51bfd4202210c6732931ea95cf41c711148a0c9770b9fcc9e1
          name: main
          resources:
            requests:
              cpu: 1m
              memory: 10Mi
          volumeMounts:
            - mountPath: /data
              name: media
              readOnly: true
      volumes:
        - name: media
          persistentVolumeClaim:
            claimName: kiwix-nfs-storage
