Kubernetes Exec
kind: Run
name: db-init
type: kubernetes-exec
dependencies: [deploy.db]
spec:
resource:
kind: "StatefulSet"
name: "postgres"
command:
[
"/bin/sh",
"-c",
"PGPASSWORD=postgres psql -w -U postgres --host=postgres --port=5432 -d postgres -c 'CREATE TABLE IF NOT EXISTS votes (id VARCHAR(255) NOT NULL UNIQUE, vote VARCHAR(255) NOT NULL, created_at timestamp default NULL)'",
]
Last updated
Was this helpful?

