elsa-core/scripts/k8s/postgres/config-map.yaml
Sipke Schoorstra adf36927dc Update Docker and k8s configs, enhance OTEL tracing
Updated `docker-compose-datadog.yml` with new environment variables and updated image versions, enhancing trace sampling and service autodiscovery. Added Kubernetes deployment, service, and role files for `elsa-server`, `elsa-studio`, `plant-uml`, `postgres`, and `trace-lens`, improving the project's infrastructure. Enhanced OpenTelemetry middleware for better error handling and detailed tracing of activity and workflow executions.
2024-09-23 23:35:30 +02:00

21 lines
732 B
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: init-db-config
data:
init-db.sh: |
#!/bin/bash
echo "Starting database initialization"
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
GRANT ALL ON SCHEMA public TO elsa;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO elsa;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO elsa;
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO elsa;
CREATE USER tracelens WITH PASSWORD 'tracelenspass';
CREATE DATABASE tracelens;
GRANT ALL PRIVILEGES ON DATABASE tracelens TO tracelens;
GRANT ALL ON SCHEMA public TO tracelens;
EOSQL
echo "Database initialization completed"