fix: remove destructive initContainer, use one-time Argo CD hook Job for schema install

This commit is contained in:
Will Anderson
2026-04-04 18:57:36 -05:00
parent 0b8eb4264a
commit 58eea3b686
2 changed files with 46 additions and 34 deletions
@@ -14,40 +14,6 @@ spec:
labels:
app: listmonk
spec:
initContainers:
# Run `--install` on first boot to create the schema; exits 0 if already installed
- name: listmonk-install
image: listmonk/listmonk:v4.1.0
command: ["/bin/sh", "-c", "./listmonk --install --yes 2>&1 | tail -5; exit 0"]
env:
- name: LISTMONK_db__host
value: "postgres-postgresql.platform.svc.cluster.local"
- name: LISTMONK_db__port
value: "5432"
- name: LISTMONK_db__name
valueFrom:
secretKeyRef:
name: listmonk-secrets
key: db_name
- name: LISTMONK_db__user
valueFrom:
secretKeyRef:
name: listmonk-secrets
key: db_user
- name: LISTMONK_db__password
valueFrom:
secretKeyRef:
name: listmonk-secrets
key: db_password
- name: LISTMONK_db__ssl_mode
value: "disable"
- name: LISTMONK_app__admin_username
value: "admin"
- name: LISTMONK_app__admin_password
valueFrom:
secretKeyRef:
name: listmonk-secrets
key: admin_password
containers:
- name: listmonk
image: listmonk/listmonk:v4.1.0