vshn / appcat-service-postgresql

AppCat Service Provider for PostgreSQL
https://vshn.github.io/appcat-service-postgresql/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Lifecycle improvements: Logs #92

Open ccremer opened 2 years ago

ccremer commented 2 years ago

Summary

As cluster-admin\ I want more logging happening in the Operator\ So that I can understand and track the progress of instance to troubleshoot broken ones.

Context

Add more logging statements using various log levels.

Usually we log what happened and not what's about to happen. Because if an action fails, we have and log the error message. That should be clear enough to track how and where the execution went.

We've already set up the logging framework using go-logr. There a log level 0 is equal to info, a 1 is a debug level. However, levels can increase with more verbosity (e.g. 2 is even more verbose).

Out of Scope

Further links

Acceptance Criteria

More to come:

Given an instance in reconciliation loop
When executing step "<step>"
Then log a message what happened

<step> (log level):
- Fetched Operator config (1)
- Compiled Helm values (1)
- Ensured deployment namespace (0)
- Ensured Credentials secret (0)
- Ensured Helm release (0)
- Ensured K8up Schedule (0)
- Ensured connection secret (0)
- Updated status (1)
- Deleted K8up Schedule (0)
- Deleted deployment Namespace (0)
- Deleted Helm release (0)
- Fetched postgres Service (1) (to determine the URL and port)

Implementation Ideas

No response