Skip to content

Commit e7009f5

Browse files
authored
📖 Replace "Help" field in EP doc with "Metadata" field (#3296)
1 parent f5af84e commit e7009f5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

designs/extensible-cli-and-scaffolding-plugins-phase-2.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ The following scenarios shows what `kubebuilder` will send/receive to the extern
177177
* External plugin to `kubebuilder`:
178178
* 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`.
179179

180-
* 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.
180+
* 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.
181181

182182
* Handling plugin failures across the chain:
183183

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

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

219219
// APIVersion defines the versioned schema of the PluginResponse that will be written back to kubebuilder.
220220
// Initially, this will be marked as alpha (v1alpha1).

pkg/plugin/external/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ type PluginResponse struct {
4747
// Command holds the command that gets executed by the plugin such as init, create api, etc.
4848
Command string `json:"command"`
4949

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

0 commit comments

Comments
 (0)