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

kubent reported API_VERSION is incorrect #662

Open
evanstucker-hates-2fa opened this issue Dec 10, 2024 · 2 comments
Open

kubent reported API_VERSION is incorrect #662

evanstucker-hates-2fa opened this issue Dec 10, 2024 · 2 comments
Labels
feature New feature or request not-stale
Milestone

Comments

@evanstucker-hates-2fa
Copy link

When I run kubent I see this:
(Redacting excess output - don't judge our geriatric cluster, haha.)

$ kubent
4:16PM INF >>> Kube No Trouble `kubent` <<<
4:16PM INF version 0.7.3 (git sha 57480c07b3f91238f12a35d0ec88d9368aae99aa)
4:16PM INF Initializing collectors and retrieving data
4:16PM INF Target K8s version is 1.24.17-eks-7f9249a
4:17PM INF Retrieved 317 resources from collector name=Cluster
4:17PM INF Retrieved 233 resources from collector name="Helm v3"
4:17PM INF Loaded ruleset name=custom.rego.tmpl
4:17PM INF Loaded ruleset name=deprecated-1-16.rego
4:17PM INF Loaded ruleset name=deprecated-1-22.rego
4:17PM INF Loaded ruleset name=deprecated-1-25.rego
4:17PM INF Loaded ruleset name=deprecated-1-26.rego
4:17PM INF Loaded ruleset name=deprecated-1-27.rego
4:17PM INF Loaded ruleset name=deprecated-1-29.rego
4:17PM INF Loaded ruleset name=deprecated-1-32.rego
4:17PM INF Loaded ruleset name=deprecated-future.rego
...REDACTED...
__________________________________________________________________________________________
>>> Deprecated APIs removed in 1.25 <<<
------------------------------------------------------------------------------------------
KIND                      NAMESPACE               NAME                                            API_VERSION           REPLACE_WITH (SINCE)
...REDACTED...
CronJob                   db                      psql-backup                                     batch/v1beta1         batch/v1 (1.21.0)
...REDACTED...

However, that CronJob is not version batch/v1beta1, it's batch/v1:

$ k get cronjob -n db psql-backup -o json | jq .apiVersion
"batch/v1"

The only place I see v1beta1 is in the metadata annotations "kubectl.kubernetes.io/last-applied-configuration".

Is kubent grepping through output or actually looking at the apiVersion field?

@evanstucker-hates-2fa
Copy link
Author

I just found this #276. If I understand this correctly, the kubent tool doesn't really tell me what I need to fix before I upgrade my cluster, it just tells me what will probably fail if I try to apply the same Kubernetes objects to the cluster after the upgrade, right?

Perhaps a warning about this with a link to issue 276 would be helpful in the output of the kubent tool?

@dark0dave
Copy link
Collaborator

I just found this #276. If I understand this correctly, the kubent tool doesn't really tell me what I need to fix before I upgrade my cluster, it just tells me what will probably fail if I try to apply the same Kubernetes objects to the cluster after the upgrade, right?

Perhaps a warning about this with a link to issue 276 would be helpful in the output of the kubent tool?

Yes, we can add a warning.

@dark0dave dark0dave added not-stale feature New feature or request labels Dec 16, 2024
@dark0dave dark0dave added this to the 0.8.0 milestone Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request not-stale
Projects
None yet
Development

No branches or pull requests

2 participants