GoogleCloudPlatform / cloud-sql-proxy-operator

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

Manager container logs show as "ERROR" severity on cloud logging (stackdriver) #563

Open hammadzz opened 5 months ago

hammadzz commented 5 months ago

The cloud-sql-proxy-operator controller has a manager container that is logging the following entries as error inGCP cloud logging:

INFO Reconcile loop started AuthProxyWorkload INFO Reconcile add/update for AuthProxyWorkload

I see a related issue that was resolved in cloud-sql-proxy https://github.com/GoogleCloudPlatform/cloud-sql-proxy/issues/138

ttosta-google commented 5 months ago

@hammadzz Thanks for reporting this bug. We will work on a fix.

hammadzz commented 5 months ago

@ttosta-google is there a way to set an argument on the cloud-sql-proxy container command? As I noticed there is an argument --structured-logs that would fix it, see here

jackwotherspoon commented 4 months ago

@hessjcg mind providing some guidance here?

jackwotherspoon commented 1 month ago

@hessjcg it is not straightforward in our documentation how to set the flags of the Cloud SQL Proxy via the operator (such as structured logs mentioned above).

Let's try and get some details on if it is possible in our documentation.

Also are structured logs enabled by default with the Operator? Seems to be a case where they are set to true here: https://github.com/GoogleCloudPlatform/cloud-sql-proxy-operator/blob/203e39ddbbd37aeda40f344ba39c3c5042c259ef/internal/workload/podspec_updates.go#L600

hessjcg commented 1 month ago

We need to make an update to the operator's code so that it logs using structured log output, similar to how the proxy sets up its logger in log.go