Three related changes, all discovered in sequence: 1. Converted all 60 tables MyISAM -> InnoDB. The datadir had just moved to GlusterFS, and MyISAM is the worst engine to put there: no crash recovery, no transactions, and it leans on file locking, which FUSE handles poorly. It also meant db-config.yaml's InnoDB tuning applied to nothing. 2. Bumped the image 6-apache -> 7-apache. LimeSurvey 6 is outside its support window; 7.1.1 is current. 3. Changed the seed-config init container from `cp -rn` to `cp -r`. application/config is a persistent volume and version.php lives in it, so no-clobber meant the stale v6 version.php survived the image upgrade: LimeSurvey read 6.17.11, concluded "DB is uptodate", and silently skipped its migration while running v7 code. With the overwrite it upgraded properly (651 -> 712). Safe because the image ships no config.php or security.php, so user config is never touched. Verified after each step: 3 surveys, 742 responses, 2 users, 17 questions. Note v7 renames response tables lime_survey_<id> -> lime_responses_<id>; that rename is why a post-upgrade count against the old name errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
98 lines
3.1 KiB
YAML
98 lines
3.1 KiB
YAML
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
|