Manager container logs show as "ERROR" severity on cloud logging (stackdriver)
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 Thanks for reporting this bug. We will work on a fix.
@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
@hessjcg mind providing some guidance here?
@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
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
Unfortunately, we cannot commit to this effort right now. We will keep this in mind for future work.
If anyone is interested in making this enhancement, we are happy to accept contributions from the community.