Skip to content

Deploying this plugin leads to cluster status log spam #129

@baurmatt

Description

@baurmatt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions