cloud-sql-proxy-operator icon indicating copy to clipboard operation
cloud-sql-proxy-operator copied to clipboard

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

Open hammadzz opened this issue 1 year ago • 5 comments

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

  • Version: 1.4.3
  • Platform: GKE

hammadzz avatar Mar 20 '24 13:03 hammadzz

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

ttosta-google avatar Mar 20 '24 13:03 ttosta-google

@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

hammadzz avatar Mar 20 '24 13:03 hammadzz

@hessjcg mind providing some guidance here?

jackwotherspoon avatar Apr 18 '24 17:04 jackwotherspoon

@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

jackwotherspoon avatar Jul 28 '24 14:07 jackwotherspoon

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

hessjcg avatar Aug 06 '24 20:08 hessjcg

Unfortunately, we cannot commit to this effort right now. We will keep this in mind for future work.

hessjcg avatar Sep 23 '24 19:09 hessjcg

If anyone is interested in making this enhancement, we are happy to accept contributions from the community.

hessjcg avatar Sep 24 '24 20:09 hessjcg