GoogleCloudPlatform / cloud-sql-proxy-operator

A Kubernetes Operator to automatically configure secure connections to Cloud SQL
Apache License 2.0
99 stars 11 forks source link

`maxSigtermDelay` is configured with wrong type when transformed to environment variable. #610

Closed mlallaouret closed 4 months ago

mlallaouret commented 4 months ago

Expected Behavior

maxSigtermDelay should be pass as a duration to the cloud sql proxy container to be taken into account

Actual Behavior

maxSigtermDelay is configured as an environment variable with a number value type whereas the cloud sql proxy expects a duration (https://github.com/GoogleCloudPlatform/cloud-sql-proxy/blob/a2070bf1c6be9996945229b1b1e0a98ce9b36dd5/cmd/root.go#L468) A number without unit is considered as 0 for a duration (tested here: https://pkg.go.dev/time#ParseDuration).

Steps to Reproduce the Problem

n/a

Specifications

I will propose a pull request to resolve this issue.