diff --git a/config-repo/pcp-stations-service.yaml b/config-repo/pcp-stations-service.yaml index 3dbc099..e3184ca 100644 --- a/config-repo/pcp-stations-service.yaml +++ b/config-repo/pcp-stations-service.yaml @@ -68,9 +68,9 @@ spring: on-profile: dev datasource: driver-class-name: org.postgresql.Driver - url: jdbc:postgresql://${pcp.infra.postgres.host}:${pcp.infra.postgres.port}/pcp_stations - username: postgres - password: password + url: "${SPRING_DATASOURCE_URL}" + username: "${SPRING_DATASOURCE_USERNAME}" + password: "${SPRING_DATASOURCE_PASSWORD}" jpa: hibernate: ddl-auto: validate diff --git a/helm/pcp-stations-service/values-dev.yaml b/helm/pcp-stations-service/values-dev.yaml index db9b249..b7464d0 100644 --- a/helm/pcp-stations-service/values-dev.yaml +++ b/helm/pcp-stations-service/values-dev.yaml @@ -13,3 +13,15 @@ ingress: extraEnv: - name: SERVER_PORT value: "8080" + - name: SPRING_DATASOURCE_URL + value: jdbc:postgresql://pcp-postgres.pcp-dev.svc.altum.local:5432/pcp_stations + - name: SPRING_DATASOURCE_USERNAME + valueFrom: + secretKeyRef: + name: pcp-stations-db + key: SPRING_DATASOURCE_USERNAME + - name: SPRING_DATASOURCE_PASSWORD + valueFrom: + secretKeyRef: + name: pcp-stations-db + key: SPRING_DATASOURCE_PASSWORD \ No newline at end of file