2021-01-20 08:30:01.054 ERROR akka.actor.OneForOneStrategy - db - Connection is not available, request timed out after 5000ms.
java.sql.SQLTransientConnectionException: db - Connection is not available, request timed out after 5000ms.
I guess I apply the wrong statefulstore config
apiVersion: cloudstate.io/v1alpha1
kind: StatefulStore
metadata:
name: postgres
spec:
postgres:
host: postgres-demo.default.svc.cluster.local
credentials:
usernameKey: demopostgresadmin
passwordKey: demopostgrespwd
databaseKey: demopostgresdb
helm install postgres bitnami/postgresql --version 9.1.4 --set persistence.enabled=false --set postgresqlUsername=cloudstate --set postgresqlPassword=cloudstate --set postgresqlDatabase=cloudstate
I also tried to modify my statefulset
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:latest
env:
- name: POSTGRES_DATABASE
value: postgredemo
- name: POSTGRES_USERNAME
value: postgredemo
- name: POSTGRES_USERNAME
value: postgredemo
but the env variables are not passed into the cloudstate sidecar, it still use "cloudstate" as user name