Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Adding setting for increasing maxRequestsPerHost for VaultAdminClient…
Browse files Browse the repository at this point in the history
… to 200
  • Loading branch information
tlisonbee committed May 19, 2017
1 parent 082c2ec commit 868e2cd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def groovyVersion = '2.3.9'

dependencies {
compile (
"com.nike:vault-client:1.0.0",
"com.nike:vault-client:1.4.0",
"com.nike.riposte:riposte-spi:$riposteVersion",
"com.nike.riposte:riposte-core:$riposteVersion",
"com.nike.riposte:riposte-typesafe-config:$riposteVersion",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import com.nike.cerberus.util.UuidSupplier;
import com.nike.cerberus.vault.CmsVaultCredentialsProvider;
import com.nike.cerberus.vault.CmsVaultUrlResolver;
import com.nike.vault.client.ClientVersion;
import com.nike.vault.client.UrlResolver;
import com.nike.vault.client.VaultAdminClient;
import com.nike.vault.client.VaultClientFactory;
Expand Down Expand Up @@ -275,8 +276,11 @@ public UuidSupplier uuidSupplier() {
*/
@Singleton
@Provides
public VaultAdminClient vaultAdminClient(UrlResolver urlResolver, VaultCredentialsProvider vaultCredentialsProvider) {
return VaultClientFactory.getAdminClient(urlResolver, vaultCredentialsProvider);
public VaultAdminClient vaultAdminClient(UrlResolver urlResolver,
VaultCredentialsProvider vaultCredentialsProvider,
@Named("vault.maxRequestsPerHost") int vaultMaxRequestsPerHost) {
logger.info("Vault clientVersion={}, maxRequestsPerHost={}, url={}", ClientVersion.getVersion(), vaultMaxRequestsPerHost, urlResolver.resolve());
return VaultClientFactory.getAdminClient(urlResolver, vaultCredentialsProvider, vaultMaxRequestsPerHost);
}

@Provides
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/cms.conf
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,5 @@ c3p0.idleConnectionTestPeriod=300
c3p0.maxIdleTimeExcessConnections=240
c3p0.preferredTestQuery=SELECT 1

# Vault Admin client
vault.maxRequestsPerHost=200

0 comments on commit 868e2cd

Please sign in to comment.