digitalocean / clusterlint

A best practices checker for Kubernetes clusters. 🤠
Apache License 2.0
542 stars 45 forks source link

False positives for "volumes must be owned by statefulset" and "fully qualified image name"? #119

Closed calmh closed 2 years ago

calmh commented 3 years ago

I'm trying to use clusterlink on a fairly new cluster, and I don't understand why clusterlint is complaining about these things in my setup. (Also the issues found differs between runs with -n namespace and | grep namespace/ which is odd...)

% clusterlint run | grep staging/
[warning] staging/pod/postgres-0: Pod referencing DOBS volumes must be owned by StatefulSet
[warning] staging/pod/postgres-0: Use fully qualified image for container 'postgres'

But it is owned by a StatefulSet, and it does use the fully qualified image name:

% kubectl describe pod -n staging postgres-0 | egrep 'Controlled|Image:'
Controlled By:  StatefulSet/postgres
    Image:          docker.io/postgres:13.2

However,

% clusterlint run -n staging
[warning] staging/pod/postgres-0: Use fully qualified image for container 'postgres'

(no complaint about the DOBS volume).

I'm confused.

varshavaradarajan commented 2 years ago

Thank you for bringing this up. There was an issue with the dobs-pod-owner check which has been resolved by #130