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

📖 Improve plugin phase 1.5 EP #2075

Merged
merged 1 commit into from
Mar 16, 2021

Conversation

Adirio
Copy link
Contributor

@Adirio Adirio commented Mar 9, 2021

While implementing plugin phase 1.5 and aligning operator-SDK, several additional concepts that were not designed at first have raised. This PR improved on the plugin phase 1.5 design document including those changes.

Plugin phase 1.5 will be useful to achieve several goals in kubebuilder. For example, plugin chaining allows to split monolithic plugins into smaller ones, and plugin bundles maintain backwards compatibility towards the user.

This updated design has been validated with operator-SDK: operator-framework/operator-sdk/pull/4581

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 9, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 9, 2021
@Adirio
Copy link
Contributor Author

Adirio commented Mar 9, 2021

This way, CLIs will be able to define bundles, which will be used in the user-facing API and
the plugin resolution process, but later they will be treated as separate plugins offering
the maintainability and separation of concerns advantages that smaller plugins have in
comparison with bigger monolithic plugins.

Copy link
Member

@camilamacedo86 camilamacedo86 Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User Stories

  • As operator developer would like to generate a project with custom plugins that will be used by default so that, after generating a project with a custom plugin such as kb init—plugins=go/v3,declarative all APIs scaffolded with kb create api subcommand all APIs scaffold will be customized with the optional plugin declarative.

  • As an operator developer would like to use a custom plugin just for a specific subcommand so that, I can, for example, use the declarative pattern only for a specific API and not for all project (e.g kb create api subcommand all APIs scaffold will be customized with the optional plugin declarative). More info; Allow every command to overwrite project-configured plugins #1941

  • As a KB maintainer/contributor and/or consumer I would like to know the plugins used to configure a project as its specific configurations and data when required so that, I can tooling upgrade and modifications actions to help the users implement smarter plugins. More info; Allow every command to overwrite project-configured plugins #1941

  • As a KB maintainer/contributor and/or consumer I would like to define a plugin is composed of 2 or more plugins so that, I can create a plugin that will re-use the code of other plugins and has customizations on top to address my need such as go/v3 + helm/v3 + plugin that does all required adjustments that make my hybrid operator works and to be able to extract the default configuration from the language files and provide different options for configuration without increase the maintainability and bring facilities to ensure the backwards compatibilities of the plugin. Also, I can easily imply that for example that any go/v3 plugin scaffold by my CLI also will be customized with my specific requirements which is a current SDK requirement.

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes proposed here are implemented in the PRs #2060 and operator-framework/operator-sdk#4581 already.

IMO it is very important because It allows the KB api starts to provide the required flexibilities for its consumer's plugin as SDK to be easier maintained as it shows a pre-requirement to start to promote solutions where people would write their own plugins to be integrated/useful for the tools.

In this way, I believe that is the first step for we have a design that allows us to start to play with.

Also, added some suggestions/ideas for clarifications such as by adding use cases and goals or non-goals of this proposal. Feel free to check and address them as, please you.

Otherwise, I have no objections and it shows great for me. 🥇

Signed-off-by: Adrian Orive <adrian.orive.oneca@gmail.com>
Copy link
Contributor

@estroz estroz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 16, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Adirio, camilamacedo86, estroz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [Adirio,camilamacedo86,estroz]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@estroz
Copy link
Contributor

estroz commented Mar 16, 2021

@DirectXMan12 has a review incoming.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 16, 2021
@estroz
Copy link
Contributor

estroz commented Mar 16, 2021

Nevermind, I think #2060 was the subject of discussion, not this PR.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 16, 2021
@k8s-ci-robot k8s-ci-robot merged commit 911f342 into kubernetes-sigs:master Mar 16, 2021
@Adirio Adirio deleted the ep-plugin-phase-1.5 branch March 16, 2021 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants