cloudnative-pg / cloudnative-pg/cnpg-i-hello-world
Deploying this plugin leads to cluster status log spam
- Dominant language
- Go
- Stars
- 5
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Reproduction commands:
```
git clone https://github.com/cloudnative-pg/cnpg-i-hello-world
cd cnpg-i-hello-world
kind create cluster --name cnpg-i-hello-world
kubectl apply --server-side -f https://github.com/cloudnative-pg/cloudnative-pg/releases/download/v1.25.0/cnpg-1.25.0.yaml
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.17.0/cert-manager.yaml
task local-kind-deploy
kubectl apply -f doc/examples/cluster-example.yaml
```
After the cluster is fully deployed, the following log output is written every second:
# Operator
```
{
"level": "info",
"ts": "2025-02-06T13:02:49.941804502Z",
"logger": "set_status_plugin_hook",
"msg": "patching cluster status with the updated plugin statuses",
"controller": "cluster",
"controllerGroup": "postgresql.cnpg.io",
"controllerKind": "Cluster",
"Cluster": {
"name": "cluster-example",
"namespace": "default"
},
"namespace": "default",
"name": "cluster-example",
"reconcileID": "3932f6e6-f86c-4ef3-8443-dbc67e1a8cb3"
}
```
# Plugin
```
{
"level": "info",
"ts": 1738846970.093195,
"logger": "cnpg_i_example_lifecyle",
"caller": "operator/status.go:57",
"msg": "plugin is enabled, no action taken"
}
```
While I could imagine that the plugin output is there for showcasing, I'm quite sure that the operator output indicates a bug.
Contributor guide
Research direction
Reproduce the issue with the commands in the report, then inspect operator/status.go:57 and the operator's cluster-status reconciliation path alongside the plugin lifecycle log. Determine why unchanged plugin status is patched every second; done means a fully deployed cluster no longer produces repeated status-patching logs when nothing has changed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100