Suggestions to make the deployment more kubernetes-friendly
foswiki Pod: (single image, single PVC mounted as /data)
initContainer:
- set command to: [ bash, -c, 'mkdir -p /data/foswiki /data/configsets /data/solr_foswiki' ] # mount the PVC as /data
- foswiki init work from https://gitlab.cern.ch/pete/test-kompose-foswiki/-/blob/master/docker-entrypoint.sh#L3-62 (except iwatch)
containers:
- nginx (foreground), listens 8080, set command to [ nginx, -g, "daemon off;" ]
- foswiki.fcgi (foreground), listens 9000; connects to solr on 127.0.0.1:8983; set command to [ /var/www/foswiki/bin/foswiki.fcgi, -l, 127.0.0.1:9000, -n, 5 ]
- iwatch (foreground) if functional on cephfs?; set command to [ iwatch ]
- solr, runs solr:5 image, listens 8983
NB: each container needs the volumeMounts as now EXCEPT that they're all mounting the same data PVC using subPaths
Before:
- mountPath: /opt/solr/server/solr/configsets
name: solr-configsets
After:
- mountPath: /opt/solr/server/solr/configsets
name: foswiki-data # single PVC name
subPath: configsets # i.e. configsets folder of the data PVC
Only the folder-creation initContainer mounts the PVC as /data in order to create the subfolders of /data
TODO: logs should go to STDOUT rather than log files
TODO: set the list of containerNames in imageChangeParams (5 containers for the foswiki imagestream; 1 for solr)