Skip to content

Commit

Permalink
fix: Add unit to CSQL_PROXY_MAX_SIGTERM_DELAY environment variable to…
Browse files Browse the repository at this point in the history
… be compatible with go duration

Fixes #610
  • Loading branch information
mlallaouret committed Jul 19, 2024
1 parent 617810e commit 92b603a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/workload/podspec_updates.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ func (s *updateState) applyContainerSpec(p *cloudsqlapi.AuthProxyWorkload, c *co
}
if p.Spec.AuthProxyContainer.MaxSigtermDelay != nil &&
*p.Spec.AuthProxyContainer.MaxSigtermDelay != 0 {
s.addProxyContainerEnvVar(p, "CSQL_PROXY_MAX_SIGTERM_DELAY", fmt.Sprintf("%d", *p.Spec.AuthProxyContainer.MaxSigtermDelay))
s.addProxyContainerEnvVar(p, "CSQL_PROXY_MAX_SIGTERM_DELAY", fmt.Sprintf("%ds", *p.Spec.AuthProxyContainer.MaxSigtermDelay))
}

return
Expand Down
2 changes: 1 addition & 1 deletion internal/workload/podspec_updates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ func TestProxyCLIArgs(t *testing.T) {
"CSQL_PROXY_PROMETHEUS": "true",
"CSQL_PROXY_QUOTA_PROJECT": "qp",
"CSQL_PROXY_MAX_CONNECTIONS": "10",
"CSQL_PROXY_MAX_SIGTERM_DELAY": "20",
"CSQL_PROXY_MAX_SIGTERM_DELAY": "20s",
"CSQL_PROXY_IMPERSONATE_SERVICE_ACCOUNT": "[email protected],[email protected]",
"CSQL_PROXY_QUIET": "true",
"CSQL_PROXY_STRUCTURED_LOGS": "true",
Expand Down

0 comments on commit 92b603a

Please sign in to comment.