Pre-create neuron-marketplace.db in initContainer for subPath mount

subPath mounts require the source file to exist on the PVC before the
main container starts. Add 'touch /data/neuron-marketplace.db' to the
initContainer so the subPath mount can bind the file at /app/neuron-marketplace.db.
This commit is contained in:
Will Anderson
2026-04-26 02:06:02 -05:00
parent 6b4553458e
commit 952e781550
@@ -22,7 +22,7 @@ spec:
slot: blue
env: prod
annotations:
config-hash: "marketplace-db-subpath-v2"
config-hash: "marketplace-db-subpath-v3"
spec:
terminationGracePeriodSeconds: 30
securityContext:
@@ -33,7 +33,7 @@ spec:
initContainers:
- name: fix-data-ownership
image: busybox:1.36
command: ["sh", "-c", "chown -R 1000:1000 /data"]
command: ["sh", "-c", "touch /data/neuron-marketplace.db && chown -R 1000:1000 /data"]
securityContext:
runAsUser: 0
runAsNonRoot: false