-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor main flow and introduce explicit plugin and config handling (#…
…877) * Refactor main flow, plugin and configuration handling * The plugin handling has been moved out of the `KnDefaultCommand` constructor where it was executed as a side-effect. The original code from `kubectl` suffers from the same issue that plugin handling is not a top-level concern but was very likely introduced as an after-thought. Instead, the plugin handling is done now by a `PluginManager` which is explicitly called in `main()`. * Configuration and bootstrap option handling is centralized in the package `option`. After the bootstrap happened, the content of the configuration file, as well as any other global configuration, can be obtained from methods on `config.GlobalConfig`. Also, all flag handling is delegated to cobra so that no own parsing is needed. * Many of the logic in `pkg/kn/commands/plugin` for plugin management has been moved up to `pkg/kn/plugin` as this code is not only relevant for `plugin list` but also for the bootstrap process. * fix: invalid subcommands will lead to a proper error message * Update pkg/kn/config/types.go Co-authored-by: Navid Shaikh <[email protected]> * Update pkg/kn/plugin/manager.go Co-authored-by: Navid Shaikh <[email protected]> * Update hack/generate-docs.go Co-authored-by: Navid Shaikh <[email protected]> * Update hack/generate-docs.go Co-authored-by: Navid Shaikh <[email protected]> * chore: Add missing links * chore: recert to shas in links in developer guide for now. Co-authored-by: Navid Shaikh <[email protected]>
- Loading branch information
1 parent
3f146b1
commit c742645
Showing
84 changed files
with
2,821 additions
and
2,652 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.