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

Discovery of plugin binary on OSX not working #3129

Closed
rocrisp opened this issue Dec 15, 2022 · 9 comments
Closed

Discovery of plugin binary on OSX not working #3129

rocrisp opened this issue Dec 15, 2022 · 9 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation.

Comments

@rocrisp
Copy link
Contributor

rocrisp commented Dec 15, 2022

What broke? What's expected?

What happened :
$kubebuilder init --plugins=sampleexternalplugin/v1 --domain example.com
"no plugin could be resolved with key "sampleexternalplugin/v1"

What's expected :
Adding external plugin: sampleexternalplugin

Reproducing this issue

  1. add the plugin (binary)
    to ~/Library/Application Support/kubebuilder/plugins/sampleexternalplugin/v1.
  2. In your project directory, run :
    kubebuilder init --plugins=sampleexternalplugin/v1 --domain example.com

KubeBuilder (CLI) Version

Version: main.version{KubeBuilderVersion:"3.6.0", KubernetesVendor:"1.24.1", GitCommit:"f20414648f1851ae97997f4a5f8eb4329f450f6d", BuildDate:"2022-08-03T11:47:17Z", GoOs:"darwin", GoArch:"amd64"}

PROJECT version

Not available

Plugin versions

Not available

Other versions

go version go1.19.3 darwin/amd64

Extra Labels

/kind documentation

@rocrisp rocrisp added the kind/bug Categorizes issue or PR as related to a bug. label Dec 15, 2022
@k8s-ci-robot k8s-ci-robot added the kind/documentation Categorizes issue or PR as related to documentation. label Dec 15, 2022
@camilamacedo86
Copy link
Member

camilamacedo86 commented Dec 17, 2022

Hi @rocrisp,

Thank you for reaching out.

Could you do the same test within the latest release and let us know if you face the same problem?
Also, could you please describe it step by step so we can reproduce it?

  1. Run X
  2. Do Y
  3. Then, ....

c/c @everettraven

@camilamacedo86 camilamacedo86 added triage/needs-information Indicates an issue needs more information in order to work on it. and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Dec 17, 2022
@rocrisp
Copy link
Contributor Author

rocrisp commented Dec 19, 2022 via email

@rocrisp
Copy link
Contributor Author

rocrisp commented Dec 20, 2022

The problem went away when I ran with latest version of Kubebuilder "3.8.0".

  1. Verify kubebuilder version

$ kubebuilder version
INFO[0000] Adding external plugin: sampleexternalplugin
Version: main.version{KubeBuilderVersion:"3.8.0", KubernetesVendor:"1.25.0", GitCommit:"184ff7465947ced153b031db8de297a778cecf36", BuildDate:"2022-12-04T18:17:10Z", GoOs:"darwin", GoArch:"amd64"}

  1. Initialize project using kubebuilder with the plugin.

$ kubebuilder init --plugins sampleexternalplugin/v1
INFO[0000] Adding external plugin: sampleexternalplugin

  1. Verify command above created initFile.txt

$ ls
PROJECT initFile.txt

@camilamacedo86
Copy link
Member

HI @rocrisp,

Thank you for provide the info.
Note that this plugin is not shipped with Kubebuilder and it is only an example over how can you create your own plugins to use within Kubebuilder. therefore, the sample must be build and configured accordingly to be used with the CLI..

So, how are you building the sampleexternalplugin?

@rocrisp
Copy link
Contributor Author

rocrisp commented Dec 22, 2022 via email

@camilamacedo86
Copy link
Member

Hi @rocrisp

Are you running make build in the root dir of the Kubebuilder project? If so, that builds Kubebuilder CLI and not the sample plugin. Or are you running make build under: https://github.com/kubernetes-sigs/kubebuilder/blob/master/docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1/?

Hi @everettraven,

have we any doc that describes how to test the sample? If so, could you please add it here? If not, and if possible, could you please add the steps here so we might get some help to add it to the docs as a follow-up?

c/c @rashmigottipati

@rocrisp
Copy link
Contributor Author

rocrisp commented Jan 30, 2023

Hi @camilamacedo86 Not sure if you saw my post earlier but the sample external plugin is working after I upgraded to the latest kubebuilder.
I created my own project instead of using https://github.com/kubernetes-sigs/kubebuilder/blob/master/docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1/?

@camilamacedo86
Copy link
Member

Hi @rocrisp,

Hi @camilamacedo86 Not sure if you saw my post earlier but the sample external plugin is working after I upgraded to the latest kubebuilder.

So, that is great 🎉 . It is sorted out in the latest kubebuilder verson.

I created my own project instead of using https://github.com/kubernetes-sigs/kubebuilder/blob/master/docs/book/src/simple-external-plugin-tutorial/testdata/sampleexternalplugin/v1/?

That is cool. We have few things that we still need to address about this one. (tutorial and e2e tests mainly). See: #2600

Please, feel free to contribute with it and if you have any suggestion, improvements and we would love to know more about. Please, raise new issues and/or PRs for those. You help is very welcome.

Regards this specific issue, I understand that we can close it out as sorted out within the latest kubebuilder release. Am I right?

@camilamacedo86
Copy link
Member

Closing this one as sorted out. However, feel free to re-open if you see that something is still required to get done here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

No branches or pull requests

3 participants