Closed dbrau closed 1 year ago
I am running into the same problem. Even filtering by namespace does not help.
I was unable to reproduce the issue but I've rewritten the pvc mode from scratch. It's supposed to be much faster and more reliable. Also it supports kubectl mode now. Please check whether your issue is resolved.
Hello,
we are using this script to check our Kubernetes environments. One mode we are using is the "mode_pvc".
We found out that the script will thrown following message if more than one pvc name exists with the same name in the cluster but exists in different namespaces.
Example: List of pvc kubectl get pvc -A | grep smsd-db
NS1 smsd-db-smsd-db-0 Bound pvc-...-...-...-ec7b798e7586 1Gi RWO ceph-rbd 136d NS2 smsd-db-smsd-db-0 Bound pvc-...-...-...-bb86-3cf213ba4331 1Gi RWO ceph-rbd 264d NS3 smsd-db-smsd-db-0 Bound pvc-...-...-...-8b11-cfc8255fe33e 1Gi RWO ceph-rbd 139d
./check_kubernetes.sh' '-H' 'https://<HOSTNAME/k8s/clusters/' '-T' 'token-...:...6tp9cb' '-m' 'pvc' '-o' '60'
check_kubernetes.sh: line 255: [: 4972544000 49815552 0 186155008 186155008: integer expression expected
Line 255 is: `((PVC_COUNT++))
Now if the pods mounting the PVC are running on the same node the above error message will occur.
We are using following specification: Kubernetes v1.23.7 Plugin Version Current Version
Thanks you in advanced