Skip to content

Commit

Permalink
Senket antall koblinger til database
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrChmyrNAV committed Dec 11, 2024
1 parent 29022ea commit ca5e410
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ fun VaultConfig.configure(role: String): HikariConfig {
val hikariConfig = HikariConfig().apply {
jdbcUrl = this@configure.jdbcUrl + databaseName
driverClassName = "org.postgresql.Driver"
this.maximumPoolSize = 4
if (role == "admin") {
this.maximumPoolSize = 2
this.maximumPoolSize = 1
val vault = VaultUtil.getInstance().client
val path: String = this@configure.vaultMountPath + "/creds/$databaseName-$role"
log.info("Fetching database credentials for role admin")
Expand Down

0 comments on commit ca5e410

Please sign in to comment.