Skip to content

Commit

Permalink
📖 Replace "Help" field in EP doc with "Metadata" field (kubernetes-si…
Browse files Browse the repository at this point in the history
  • Loading branch information
atoato88 authored and Sajiyah-Salat committed Jun 11, 2023
1 parent ea3933c commit 5990fd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions designs/extensible-cli-and-scaffolding-plugins-phase-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ The following scenarios shows what `kubebuilder` will send/receive to the extern
* External plugin to `kubebuilder`:
* The plugin reads the `PluginRequest` through its `stdin` and processes the request based on the `Command` that was sent. If the `Command` doesn't match what the plugin supports, it writes back an error immediately without any further processing. If the `Command` matches what the plugin supports, it constructs a `PluginResponse` containing the `Command` that was executed by the plugin, and modified `Universe` based on the new files that were scaffolded by the external plugin, `Error` and `ErrorMsg` that add any error information, and writes the `PluginResponse` back to `kubebuilder` through `stdout`.

* Note: If `--help` flag is being passed from `kubebuilder` to the external plugin through `PluginRequest`, the plugin attaches its help text information in the `Help` field of the `PluginResponse`. Both `PluginRequest` and `PluginResponse` also contain `APIVersion` field to have compatible versioned schemas.
* Note: If `--help` flag is being passed from `kubebuilder` to the external plugin through `PluginRequest`, the plugin attaches its help text information in the `Metadata` field of the `PluginResponse`. Both `PluginRequest` and `PluginResponse` also contain `APIVersion` field to have compatible versioned schemas.

* Handling plugin failures across the chain:

Expand Down Expand Up @@ -212,9 +212,9 @@ type PluginResponse struct {
// Command holds the command that gets executed by the plugin such as init, create api, etc.
Command string `json:"command"`

// Help contains the plugin specific help text that the plugin returns to kubebuilder when it receives
// Metadata contains the plugin specific help text that the plugin returns to Kubebuilder when it receives
// `--help` flag from Kubebuilder.
Help string `json:"help,omitempty"`
Metadata plugin.SubcommandMetadata `json:"metadata"`

// APIVersion defines the versioned schema of the PluginResponse that will be written back to kubebuilder.
// Initially, this will be marked as alpha (v1alpha1).
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/external/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type PluginResponse struct {
// Command holds the command that gets executed by the plugin such as init, create api, etc.
Command string `json:"command"`

// Help contains the plugin specific help text that the plugin returns to Kubebuilder when it receives
// Metadata contains the plugin specific help text that the plugin returns to Kubebuilder when it receives
// `--help` flag from Kubebuilder.
Metadata plugin.SubcommandMetadata `json:"metadata"`

Expand Down

0 comments on commit 5990fd6

Please sign in to comment.