keisku / kubectl-explore

A better kubectl explain with the fuzzy finder
MIT License
352 stars 12 forks source link

Unable to compile #5

Closed chdorb closed 2 years ago

chdorb commented 2 years ago
/usr/lib/golang/pkg/tool/linux_amd64/compile -o $WORK/b001/_pkg_.a -trimpath "$WORK/b001=>" -shared -p main -complete -installsuffix shared -buildid rMzng1wxnKdfx0-b_Hcb/rMzng1wxnKdfx0-b_Hcb -goversion go1.16.12 -D "" -importcfg $WORK/b001/importcfg -pack ./_build/src/github.com/kei6u/kubectl-explore/explorer.go ./_build/src/github.com/kei6u/kubectl-explore/main.go ./_build/src/github.com/kei6u/kubectl-explore/options.go
# github.com/kei6u/kubectl-explore
_build/src/github.com/kei6u/kubectl-explore/options.go:62:112: genericclioptions.NewConfigFlags(true).WithDeprecatedPasswordFlag().WithDiscoveryBurst(300).WithDiscoveryQPS undefined (type *genericclioptions.ConfigFlags has no field or method WithDiscoveryQPS)
chdorb commented 2 years ago

with kubernetes cli-runtime v1.22.0, maybe too old πŸ€” (I'm just trying to package it properly for Fedora)

keisku commented 2 years ago

@chdorb Hi, thank you for reaching out.

What I investigated:

WithDiscoveryQPS was added in https://github.com/kubernetes/cli-runtime/commit/1fc251024e45e16b945287fd7f17007cd39aeb0f and tagged as follows.

v0.24.0-alpha.1  v0.24.0-alpha.0 v0.23.2-rc.0 v0.23.1 v0.23.1-rc.0 v0.23.0 v0.23.0-rc.1 v0.23.0-rc.0 kubernetes-1.24.0-alpha.1 kubernetes-1.24.0-alpha.0 kubernetes-1.23.2-rc.0 kubernetes-1.23.1 kubernetes-1.23.1-rc.0 kubernetes-1.23.0 kubernetes-1.23.0-rc.1 kubernetes-1.23.0-rc.0

It doesn't include v1.22.0 and there is no WithDiscoveryQPS implementation in v1.22.0.

https://github.com/kubernetes/cli-runtime/blob/28a43b9880063ecbefbe8223c1d9d3df9004dea8/pkg/genericclioptions/config_flags.go#L1-L389

with kubernetes cli-runtime v1.22.0, maybe too old πŸ€”

Your suggestion seems to be correct. Will update kubectl version work for you? But, I am not sureπŸ₯²

chdorb commented 2 years ago

Yes you're right, this method is available from v1.23 of kubernetes. I just wanted to package an rpm (with build and dependencies requirements available) for Fedora Linux distribution, but even in rawhide (development version), lastest package is on v1.22.0 version https://src.fedoraproject.org/rpms/golang-k8s-cli-runtime

I'll wait for building the package but it's ok to run it with the compiled release you provide. πŸ‘ I close this issue.

PS: thank you for this great tool, as kubectl explain needs knowing in advance the resources name/fields and that's by default not explained ! πŸ˜