apiVersion: apps/v1 kind: Deployment metadata: name: limesurvey namespace: limesurvey spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app: limesurvey template: metadata: labels: app: limesurvey spec: # ONE volume mounted twice with subPath. Do not split this into two # volume entries pointing at the same PVC -- that wedges kubelet's volume # setup and leaves the pod stuck in Init with no events. initContainers: - name: seed-config image: docker.io/martialblog/limesurvey:7-apache command: - sh - -c # NOT `cp -rn`. application/config is a persistent volume, and # version.php lives in it -- with no-clobber the stale version.php # survives an image upgrade, LimeSurvey reads the OLD version, # decides "DB is uptodate" and silently skips its migration. That # is what happened upgrading 6 -> 7 on 2026-09-21: the image was # v7 while the app still reported 6.17.11. # Overwriting is safe: the image ships NO config.php or # security.php, so the user's own files are never touched. - cp -r /var/www/html/application/config/. /seed/ volumeMounts: - name: data mountPath: /seed subPath: config containers: - name: limesurvey image: docker.io/martialblog/limesurvey:7-apache env: - name: DB_TYPE value: mysql - name: DB_HOST value: limesurvey-db - name: DB_PORT value: "3306" - name: DB_NAME value: limesurvey - name: DB_USERNAME value: limesurvey - name: DB_PASSWORD valueFrom: secretKeyRef: name: limesurvey key: db-password - name: ADMIN_USER value: admin - name: ADMIN_NAME value: Jason - name: ADMIN_EMAIL value: admin@wittyoneoff.com - name: ADMIN_PASSWORD valueFrom: secretKeyRef: name: limesurvey key: admin-password - name: PUBLIC_URL value: https://surveys.skatefight.us ports: - containerPort: 8080 name: http readinessProbe: httpGet: path: / port: 8080 initialDelaySeconds: 20 periodSeconds: 10 resources: requests: cpu: 100m memory: 256Mi limits: memory: 1Gi volumeMounts: - name: data mountPath: /var/www/html/upload subPath: upload - name: data mountPath: /var/www/html/application/config subPath: config volumes: - name: data persistentVolumeClaim: claimName: limesurvey-app