Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to new postgres instances #254

Merged
merged 2 commits into from
Dec 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Last ned VAULT CLI og kjør føljande kommandosar

Preprod credentials:

`vault read postgresql/preprod-fss/creds/veilarbfilter-admin`
`vault read postgresql/preprod-fss/creds/veilarbfilter-fss15-admin`

Prod credentials:

`vault read postgresql/prod-fss/creds/veilarbfilter-admin`
`vault read postgresql/prod-fss/creds/veilarbfilter-fss13-admin`

## Kontakt og spørsmål

Expand Down
6 changes: 4 additions & 2 deletions src/main/java/no/nav/pto/veilarbfilter/util/DbUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ public static HikariConfig createDataSourceConfig(String dbUrl) {
}

public static String getSqlAdminRole() {
return "veilarbfilter-admin";
boolean isProd = isProduction().orElse(false);
return (isProd) ? "veilarbfilter-fss13-admin" : "veilarbfilter-fss15-admin";
}

public static String getSqlReadOnlyRole() {
return "veilarbfilter-user";
boolean isProd = isProduction().orElse(false);
return (isProd) ? "veilarbfilter-fss13-user" : "veilarbfilter-fss15-user";
}

@SneakyThrows
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ management.endpoint.metrics.enabled=true
management.endpoints.web.base-path=/internal
management.endpoints.web.exposure.include=health, prometheus
management.endpoint.prometheus.enabled=true
management.metrics.export.prometheus.enabled=true
management.prometheus.metrics.export.enabled=true
management.endpoint.health.probes.enabled=true
management.endpoint.health.group.liveness.include=livenessState,dataSource
#ENV PROPS -- start
Expand Down