-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Plugins Phase 1 #1469
Plugins Phase 1 #1469
Commits on Apr 14, 2020
-
Plugin implementation: Phase 1
These changes are the implementation of concepts outlined in designs/extensible-cli-and-scaffolding-plugins-phase-1.md * cmd/: remove all but 'edit' and 'update' subcommands in favor of plugins that implement removed commands * internal/cmdutil: RunOptions configure Run() to execute a command in a generic manner * pkg/cli: CLI interface and cobra CLI constructors. Most commands from cmd/ were move here and modified to initialize plugins * pkg/plugin: Plugin and PluginGetter interfaces for v1 and v2 scaffolds. These are kubebuilider's base Go plugins consumed by pkg/cli.CLI
Configuration menu - View commit details
-
Copy full SHA for 1bba4fb - Browse repository at this point
Copy the full SHA 1bba4fbView commit details -
pkg/cli: validate cli struct's fields
pkg/plugin: validation for plugin version strings pkg/internal/validation: project-wide validation logic; move pkg/model/resource/validation.go functions here
Configuration menu - View commit details
-
Copy full SHA for 883e8c6 - Browse repository at this point
Copy the full SHA 883e8c6View commit details -
pkg/scaffold: pass pkg/model/config.Config to scaffolds, not the
internal type pkg/plugin: InjectConfig passes a Config object to a plugin that the plugin can modify instead of having the plugin load/save the plugin itself pkg/cli: manage initialization, loading, and saving of a Config object, and inject the Config object into plugins internal/cmdutil: remove LoadConfig and Config object parameters from RunOptions interface cmd: rewrite edit/update to respect new command runner interface
Configuration menu - View commit details
-
Copy full SHA for e1d2f11 - Browse repository at this point
Copy the full SHA e1d2f11View commit details -
pkg/cli: use --plugins to determine which plugin.Base's kubebuilder
should run for a subcommand. This option is global. Refactoring of getBaseFlags -> parseBaseFlags allows multiple global flags to be parsed for a cli struct. plugin filtering considers short names, ex. --plugins="go" rather than --plugins="go.kubebuilder.io/v2.0.0". WithDefaultPlugins sets the default plugins a CLi should use in case --plugins or the config 'layout' are not set pkg/model/config: Config support the 'layout' key which indicates the plugin that scaffolded a project, by plugin key pkg/plugin: SplitKey, KeyFor, Key, GetShortName are utility functions for plugin keys * pkg/{cli,plugin}: add plugin name validation * pkg/plugin/{v1,v2}: set layout key in config Please enter the commit message for your changes. Lines starting
Configuration menu - View commit details
-
Copy full SHA for d331eaa - Browse repository at this point
Copy the full SHA d331eaaView commit details -
pkg/mode/config: add arbitrary extra fields to Config under the
'plugins' key, with each plugin's config keyed by its plugin key, and an encoder and decoder for plugin configuration objects. Add marshal/unmarshal functions for a Config internal/config: use Config marshalling/unmarshalling to read/write a config, and add tests
Configuration menu - View commit details
-
Copy full SHA for 478c233 - Browse repository at this point
Copy the full SHA 478c233View commit details -
1
Configuration menu - View commit details
-
Copy full SHA for e4b8d15 - Browse repository at this point
Copy the full SHA e4b8d15View commit details -
Any changes that break 'PROJECT' file backwards-compatibility require…
… a version bump. This new version will be '3-alpha', which will eventually be bumped to '3' once the below config changes have stabilized. *: add tests and checks for v3 where appropriate
Configuration menu - View commit details
-
Copy full SHA for 5d5e7d2 - Browse repository at this point
Copy the full SHA 5d5e7d2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 706019b - Browse repository at this point
Copy the full SHA 706019bView commit details -
pkg/plugin: inject command name from Context so help messages contain
the correct command name pkg/cli: use layout or cliPluginKeys in error messages if no plugin for a command is found
Configuration menu - View commit details
-
Copy full SHA for cd2d948 - Browse repository at this point
Copy the full SHA cd2d948View commit details
Commits on Apr 18, 2020
-
pkg/cli: move --plugins to init, since phase 1 only allows one plugin
to be used for scaffolding at a time, and a config's 'layout' value should be used for other commands. Also change the implementation of resolvePluginsByKey to only match one key, and add tests
Configuration menu - View commit details
-
Copy full SHA for 3596e21 - Browse repository at this point
Copy the full SHA 3596e21View commit details
Commits on Apr 28, 2020
-
*: fix validation of default values, update license years, and make
all encode/decode operations on a Config methods
Configuration menu - View commit details
-
Copy full SHA for 1ee71ec - Browse repository at this point
Copy the full SHA 1ee71ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for a639be0 - Browse repository at this point
Copy the full SHA a639be0View commit details -
pkg/model/config: use Version3Alpha variable name for project version…
… "3-alpha", and update all references pkg/cli: generalize layout key check for future v3 project version types
Configuration menu - View commit details
-
Copy full SHA for 8093011 - Browse repository at this point
Copy the full SHA 8093011View commit details