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

v0.5.0 broke --additional-kind: FTL Failed to evaluate input error="Malformed version: <na>" name=Rego #204

Closed
thomas-riccardi opened this issue Aug 17, 2021 · 3 comments

Comments

@thomas-riccardi
Copy link

$ ./kubent-0.5.0 -k ~/.kube/config -c sa -a CustomResourceDefinition.v1beta1.apiextensions.k8s.io
4:42PM INF >>> Kube No Trouble `kubent` <<<
4:42PM INF version 0.5.0 (git sha e8065c4aaa20a57033684e63f40a0e6f44add6f4)
4:42PM INF Initializing collectors and retrieving data
E0817 16:42:03.026159 1270373 memcache.go:199] couldn't get resource list for external.metrics.k8s.io/v1beta1: Got empty response for: external.metrics.k8s.io/v1beta1
4:42PM INF Target K8s version is 1.18.20-gke.900
4:42PM INF Retrieved 222 resources from collector name=Cluster
4:42PM INF Retrieved 0 resources from collector name="Helm v2"
4:42PM INF Retrieved 29 resources from collector name="Helm v3"
4:42PM INF Loaded ruleset name=custom.rego.tmpl
4:42PM INF Loaded ruleset name=deprecated-1-16.rego
4:42PM INF Loaded ruleset name=deprecated-1-22.rego
4:42PM INF Loaded ruleset name=deprecated-1-25.rego
4:42PM FTL Failed to evaluate input error="Malformed version: <na>" name=Rego

before it worked:

$ ./kubent-0.4.0 -k ~/.kube/config -c sa -a CustomResourceDefinition.v1beta1.apiextensions.k8s.io
4:41PM INF >>> Kube No Trouble `kubent` <<<
4:41PM INF version 0.4.0 (git sha 3d82a3f0714c97035c27374854703256b3d69125)
4:41PM INF Initializing collectors and retrieving data
E0817 16:41:58.222363 1270330 memcache.go:199] couldn't get resource list for external.metrics.k8s.io/v1beta1: Got empty response for: external.metrics.k8s.io/v1beta1
4:41PM INF Retrieved 116 resources from collector name=Cluster
4:41PM INF Retrieved 0 resources from collector name="Helm v2"
4:41PM INF Retrieved 29 resources from collector name="Helm v3"
4:41PM INF Loaded ruleset name=custom.rego.tmpl
4:41PM INF Loaded ruleset name=deprecated-1-16.rego
4:41PM INF Loaded ruleset name=deprecated-1-22.rego
__________________________________________________________________________________________
>>> Additional resources (custom) <<<
------------------------------------------------------------------------------------------
KIND                       NAMESPACE     NAME                                             API_VERSION                    REPLACE_WITH (SINCE)
CustomResourceDefinition   <undefined>   volumesnapshotcontents.snapshot.storage.k8s.io   apiextensions.k8s.io/v1beta1   <na> (<na>+)
CustomResourceDefinition   <undefined>   capacityrequests.internal.autoscaling.k8s.io     apiextensions.k8s.io/v1beta1   <na> (<na>+)
CustomResourceDefinition   <undefined>   scalingpolicies.scalingpolicy.kope.io            apiextensions.k8s.io/v1beta1   <na> (<na>+)
CustomResourceDefinition   <undefined>   updateinfos.nodemanagement.gke.io                apiextensions.k8s.io/v1beta1   <na> (<na>+)
CustomResourceDefinition   <undefined>   volumesnapshotclasses.snapshot.storage.k8s.io    apiextensions.k8s.io/v1beta1   <na> (<na>+)
CustomResourceDefinition   <undefined>   volumesnapshots.snapshot.storage.k8s.io          apiextensions.k8s.io/v1beta1   <na> (<na>+)
__________________________________________________________________________________________
>>> Deprecated APIs removed in 1.22 <<<
------------------------------------------------------------------------------------------
KIND      NAMESPACE                                      NAME                        API_VERSION          REPLACE_WITH (SINCE)
Ingress   xxx                            yyy              extensions/v1beta1   networking.k8s.io/v1beta1 (1.14+)

(same issue with -a ManagedCertificate.v1beta1.networking.gke.io)

@stepanstipl
Copy link
Contributor

@thomas-riccardi thanks for reporting this 👍 . And yep, I see where the issue is - unfortunately, the "clever" version filtering logic introduced in 0.5.0 broke additional resources, as those don't have the version info. I'll try to fix this shortly.

stepanstipl added a commit that referenced this issue Aug 27, 2021
Not all results are expected to have valid versions, such as additional
resources.

fixes #204
stepanstipl added a commit that referenced this issue Aug 27, 2021
Not all results are expected to have valid versions, such as additional
resources.

fixes #204
stepanstipl added a commit that referenced this issue Aug 27, 2021
Not all results are expected to have valid versions, such as additional
resources.

fixes #204
@stepanstipl
Copy link
Contributor

This should now be fixed (#209), @thomas-riccardi if you want to confirm it's working, you can use the latest "nightly" release.

There're some related minor output fixes I've found while working on this to be done (#207), and then we'll cut 0.5.1.

@thomas-riccardi
Copy link
Author

@stepanstipl thanks, I confirm it works again!

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

No branches or pull requests

2 participants