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

plugin feature #300

Closed
wants to merge 1 commit into from
Closed

plugin feature #300

wants to merge 1 commit into from

Conversation

tedteng
Copy link
Contributor

@tedteng tedteng commented May 12, 2023

What this PR does / why we need it:
introduce plugins feature

(N/A:N/A)➜  plugins ls -lrt
total 3840
-rw-r--r-- 1 xxxxx 3930736 May 12 12:56 example.so
go run main.go
...
Usage:
  gardenctl [command]

Available Commands:
  ....
  example      A brief description of your command 
 
go run main.go example
Test called

Which issue(s) this PR fixes:
Fixes #299

Special notes for your reviewer:

var NewCmd = &cobra.Command{  //must be `NewCmd` name

when "hidden:false", make gen-markdown will generate all documentation, including the plugin's description, because https://github.com/gardener/gardenctl-v2/compare/master...tedteng:gardenctl-v2:plugins?expand=1#diff-f36fcc143c1388c7c89b28b165cfb74d7f4c00fd6e58667a5594437f13180436R127-R129 and plugins(example.so) use cobra library as well.

Release note:

introduce plugins feature

@tedteng tedteng requested a review from a team as a code owner May 12, 2023 05:20
@gardener-robot gardener-robot added needs/review Needs review size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) labels May 12, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 12, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 12, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 16, 2023
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels May 16, 2023
@tedteng tedteng marked this pull request as draft May 16, 2023 06:50
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 17, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label May 17, 2023
@tedteng tedteng marked this pull request as ready for review May 17, 2023 02:30
@petersutter
Copy link
Member

Hi @tedteng, are you aware of all the downsides that come with the golang plugins? If not I recommend checking out e.g. https://www.reddit.com/r/golang/comments/b6h8qq/is_anyone_actually_using_go_plugins/. Also (it's mentioned somewhere in the comments in this thread) windows is not supported.

@tedteng
Copy link
Contributor Author

tedteng commented May 19, 2023

ah, didn't aware of it. my initial idea was to implement some less common features using plugins, if they proved useful, then migrate them into the main code if needed. the experiment in my local shows that the lower golang version main code cannot recognize higher golang version plugins and only works with higher golang version in main code with low/same version of plugins

@tedteng tedteng closed this May 22, 2023
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label May 22, 2023
@tedteng tedteng deleted the plugins branch May 30, 2023 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review size/m Size of pull request is medium (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

introduce plug-in feature in gardenctlv2
6 participants