shell-operator icon indicating copy to clipboard operation
shell-operator copied to clipboard

Metric `volume_cleaner_kube_snapshot_objects` reports inconsistent values across multiple namespaces

Open thomas315 opened this issue 5 months ago • 0 comments

Expected behavior (what you expected to happen): Using metric volume_cleaner_kube_snapshot_objects it should provide the amount of snapshotted objects over multiple namespaces. If number of objects doesn't change, the metric should not change.

Actual behavior (what actually happened): Metric reports the amount of objects that exist in one specific namespace by random it seems. Over time the metric is jumping. Metric example: {__name__="volume_cleaner_kube_snapshot_objects", binding="pvcs", endpoint="metrics", hook="expiration.sh", instance="10.42.24.136:9115", job="jobname", namespace="ns", pod="pod-6464d568cf-6wwv6", queue="main"}

Image

Steps to reproduce:

Environment:

  • Shell-operator version: 1.9.1
  • Kubernetes version: 1.32
  • Installation type (kubectl apply, helm chart, etc.): helm

Anything else we should know?:

Additional information for debugging (if necessary):

Hook script
```json
{
  "configVersion": "v1",
  "kubernetes": [
    {
      "name": "pvcs",
      "executeHookOnSynchronization": false,
      "executeHookOnEvent": [],
      "keepFullObjectsInMemory": false,
      "kind": "PersistentVolumeClaim",
      "namespace": {
        "nameSelector": {
          "matchNames": [
            "ns1",
            "ns2",
            "ns3"
          ]
        }
      },
      "jqFilter": ""
    }
  ],
  "schedule": [
    {
      "allowFailure": true,
      "includeSnapshotsFrom": [
        "pvcs"
      ],
      "crontab": ""
    }
  ]
}
```

Logs
no logs available that is showing any information about the mentioned metric

thomas315 avatar Jul 30 '25 10:07 thomas315