Skip to content

Commit

Permalink
add support for MaxConnsPerHost to Vault client
Browse files Browse the repository at this point in the history
  • Loading branch information
ccapurso committed Dec 14, 2023
1 parent 91cb33a commit 4ced69a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dependency/client_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ type CreateVaultClientInput struct {
TransportIdleConnTimeout time.Duration
TransportMaxIdleConns int
TransportMaxIdleConnsPerHost int
TransportMaxConnsPerHost int
TransportTLSHandshakeTimeout time.Duration
}

Expand Down Expand Up @@ -280,6 +281,7 @@ func (c *ClientSet) CreateVaultClient(i *CreateVaultClientInput) error {
MaxIdleConns: i.TransportMaxIdleConns,
IdleConnTimeout: i.TransportIdleConnTimeout,
MaxIdleConnsPerHost: i.TransportMaxIdleConnsPerHost,
MaxConnsPerHost: i.TransportMaxConnsPerHost,
TLSHandshakeTimeout: i.TransportTLSHandshakeTimeout,
}

Expand Down
1 change: 1 addition & 0 deletions manager/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,7 @@ func NewClientSet(c *config.Config) (*dep.ClientSet, error) {
TransportIdleConnTimeout: config.TimeDurationVal(c.Vault.Transport.IdleConnTimeout),
TransportMaxIdleConns: config.IntVal(c.Vault.Transport.MaxIdleConns),
TransportMaxIdleConnsPerHost: config.IntVal(c.Vault.Transport.MaxIdleConnsPerHost),
TransportMaxConnsPerHost: config.IntVal(c.Vault.Transport.MaxConnsPerHost),
TransportTLSHandshakeTimeout: config.TimeDurationVal(c.Vault.Transport.TLSHandshakeTimeout),
K8SAuthRoleName: config.StringVal(c.Vault.K8SAuthRoleName),
K8SServiceAccountTokenPath: config.StringVal(c.Vault.K8SServiceAccountTokenPath),
Expand Down

0 comments on commit 4ced69a

Please sign in to comment.