Skip to content

Commit c5c655d

Browse files
Copilotphrocker
andauthored
Fix agent-proxy deployment: add missing PostgreSQL configuration (#161)
* Initial plan * Add PostgreSQL datasource configuration to agent-proxy deployment - Add PostgreSQL datasource URL, driver, and connection pool settings - Add JPA/Hibernate PostgreSQL dialect configuration - Add SPRING_DATASOURCE_USERNAME and SPRING_DATASOURCE_PASSWORD env vars - Fix agent-proxy deployment H2 fallback issue causing VECTOR type error Co-authored-by: phrocker <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: phrocker <[email protected]>
1 parent 4a155a2 commit c5c655d

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

sentrius-chart/templates/agentproxy-deployment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,16 @@ spec:
4343
- name: config-volume
4444
mountPath: /config
4545
env:
46+
- name: SPRING_DATASOURCE_USERNAME
47+
valueFrom:
48+
secretKeyRef:
49+
name: {{ .Release.Name }}-db-secret
50+
key: db-username
51+
- name: SPRING_DATASOURCE_PASSWORD
52+
valueFrom:
53+
secretKeyRef:
54+
name: {{ .Release.Name }}-db-secret
55+
key: db-password
4656
- name: KEYSTORE_PASSWORD
4757
valueFrom:
4858
secretKeyRef:

sentrius-chart/templates/configmap.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ data:
3030
#flyway configuration
3131
spring.main.web-application-type=reactive
3232
spring.flyway.enabled=false
33+
spring.datasource.url=jdbc:postgresql://sentrius-postgres:5432/sentrius
34+
spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
35+
spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
36+
spring.datasource.driver-class-name=org.postgresql.Driver
37+
# Connection pool settings
38+
spring.datasource.hikari.maximum-pool-size=10
39+
spring.datasource.hikari.minimum-idle=5
40+
spring.datasource.hikari.idle-timeout=30000
41+
spring.datasource.hikari.max-lifetime=1800000
42+
# Hibernate settings (optional, for JPA)
43+
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
44+
# Disable automatic schema generation in production
45+
spring.jpa.hibernate.ddl-auto=none
46+
# Ensure this path matches your project structure
47+
#spring.flyway.locations=classpath:db/migration/
48+
spring.flyway.baseline-on-migrate=true
3349
logging.level.org.springframework.web=INFO
3450
logging.level.org.springframework.security=INFO
3551
logging.level.io.sentrius=DEBUG

0 commit comments

Comments
 (0)