Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display target api to use #5

Closed
NargiT opened this issue May 14, 2020 · 3 comments · Fixed by #85
Closed

display target api to use #5

NargiT opened this issue May 14, 2020 · 3 comments · Fixed by #85
Assignees

Comments

@NargiT
Copy link

NargiT commented May 14, 2020

Hello

I did run your script and it's nice, but would be cool to specify some helpful information if possible.

1:24PM INF >>> Kube No Trouble `kubent` <<<
1:24PM INF version 0.2.0 (git sha b9b45f347c7e67cf488d8dd6e20c8b848c595a3e)
1:24PM INF Initializing collectors and retrieving data
1:24PM INF Retrieved 70 resources from collector name=Cluster
1:24PM INF Retrieved 0 resources from collector name="Helm v2"
1:24PM INF Retrieved 0 resources from collector name="Helm v3"
1:24PM INF Loaded ruleset name=deprecated-1-16.rego
1:24PM INF Loaded ruleset name=deprecated-1-20.rego
________________________________________________________________________________________
>>> 1.20 Deprecated APIs <<<
----------------------------------------------------------------------------------------
KIND      NAMESPACE    NAME                 API_VERSION    NEW_API_VERSION
Ingress   test         test-ingress    extensions/v1beta1  networking.k8s.io/v1beta1

or event a link to the current version for deprecation api.
Example : https://kubernetes.io/blog/2019/07/18/api-deprecations-in-1-16/ or https://v1-14.docs.kubernetes.io/docs/concepts/services-networking/ingress/

@stepanstipl
Copy link
Contributor

That sounds like a good idea. I was thinking about providing more relevant help depending on the resource kind, but perhaps even the link is a good start. 👍

@wrdls
Copy link

wrdls commented Jul 10, 2020

It might also be useful to display from which Kubernetes version the new api is available. Or warn if your current version is too old. This info is available in the docs @NargiT linked so it might be pretty easy to include this info.

E.g. networking.k8s.io/v1beta1 is available since v1.14.

>>> 1.20 Deprecated APIs <<<
----------------------------------------------------------------------------------------
KIND      NAMESPACE    NAME                 API_VERSION    NEW_API_VERSION               AVAILABLE_SINCE
Ingress   test         test-ingress    extensions/v1beta1  networking.k8s.io/v1beta1     1.14

This might be an edge case but it could prevent people from breaking their stuff.

@stepanstipl
Copy link
Contributor

Support to display replacement API and since when it's available in K8s has been merged in #85. There're probably be a new release in early Jan, but if anyone wants to give it a go it should be available in next nightly build which gets published in GH Releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants