FairwindsOps/pluto

--target-versions version issue in pluto

rshiva777 opened this issue · 2 comments

What happened?

Hi,

I am trying to check the deprecated API from kubernetes 1.20 to 1.21

  1. If i give a wrong --target-versions of kubernetes it is still showing the results. Why does pluto take the wrong version ?
    • again in the "REMOVED IN " column it is showing v1.22.0 version of k8s, but in the command i want it to be 1.21. why is it showing wrongly?
test@test:~/$ pluto version
Version:5.11.2 Commit:359e9d2c4a5648238edf1777021e5f352b9a3b92

test@test:~/$ pluto detect-files --directory . --target-versions k8s=v1.30.0  -o markdown
| NAME  | NAMESPACE |  KIND   |      VERSION       |     REPLACEMENT      | DEPRECATED | DEPRECATED IN | REMOVED | REMOVED IN |
|-------|-----------|---------|--------------------|----------------------|------------|---------------|---------|------------|
| nginx | <UNKNOWN> | Ingress | extensions/v1beta1 | networking.k8s.io/v1 | true       | v1.14.0       | true    | v1.22.0    |

  1. Is there any way we can compare the API s deprecated?
    • example where i can give my current cluster version, and target cluster version in the command line. It should display the list of resources that are deprecated in the target cluster version

What did you expect to happen?

If i give wrong target version/ non existing version , pluto should throw an error ?

How can we reproduce this?

cat nginx.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx
spec:
  ingressClassName: contourt
  rules:
  - host: test.nginx.com
    http:
      paths:
      - backend:
          service:
            name: nginx01
            port:
              number: 80
        path: /
        pathType: Prefix

test@test:~/$ pluto detect-files --directory . --target-versions k8s=v1.30.0 -o markdown

NAME NAMESPACE KIND VERSION REPLACEMENT DEPRECATED DEPRECATED IN REMOVED REMOVED IN
nginx Ingress extensions/v1beta1 networking.k8s.io/v1 true v1.14.0 true v1.22.0

Version

pluto 5.11.2

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

No response

Also, is there a way to list the deprecated resources in the live cluster, i see the feature is not available yet in pluto.

This feature is available in kubent which was very useful to list depreacted apis in running cluster, and list what api's are not supported in we upgrade to a target cluster.

Hello!

I believe you are seeing the versions that are removed in 1.22 because they were deprecated in earlier versions of kubernetes (prior to 1.21).

As for the live in-cluster resources, please see the FAQ here - https://pluto.docs.fairwinds.com/faq/#frequently-asked-questions