doitintl / kube-no-trouble

Easily check your clusters for use of deprecated APIs
MIT License
3.21k stars 158 forks source link

Add FAQ explaining potential false positives #528

Closed stepanstipl closed 6 months ago

stepanstipl commented 1 year ago

We should add FAQ section explaining false positives situations, which are likely not false (last-applied), as we get questions on this regularly. E.g.: ^1

sidewinder12s commented 1 year ago

With server side apply becoming more common, wouldn't those resources be missed by kubent since it does not rely on this annotation?

mariusmagureanu commented 1 year ago

Hi all,

I guess I'll be joining the party of confused people. I've been successfully using kubent for multiple k8s upgrade sessions.

Now I'm preparing for 1.26 and getting some false positives - I hope.

See the below snippet:

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"autoscaling/v2","kind":"HorizontalPodAutoscaler", ...
  creationTimestamp: "2023-01-17T20:59:33Z"
...

According to the snippet above I'd expect for that specific HPA to not be reported against upgrading to 1.26;

Am I misunderstanding something? If so, any pointer would be highly appreciated.

Otherwise, if this indeed is a bug I'd gladly contribute with a fix.

Thank you.

github-actions[bot] commented 10 months ago

This issue has not seen any activity in last 60 days, and has been marked as stale.

madAndroid commented 9 months ago

With server side apply becoming more common, wouldn't those resources be missed by kubent since it does not rely on this annotation?

This is the exact behaviour we're seeing, ArgoCD in our management cluster is applying changes with server-side-apply, and consequently we're seeing the false positives, since the resource itself doesn't match the annotation

github-actions[bot] commented 7 months ago

This issue has not seen any activity in last 60 days, and has been marked as stale.

github-actions[bot] commented 6 months ago

This issue was closed because it has been stalled for 90 days with no activity.

naveenb29 commented 6 months ago

can confirm this this happening with HPA https://github.com/doitintl/kube-no-trouble/issues/528#issuecomment-1935538883