Unverified Commit 077ffec4 authored by Matthew Fisher's avatar Matthew Fisher
Browse files

fix: use yaml annotations for yaml.v2 validation


Signed-off-by: default avatarMatthew Fisher <matt.fisher@microsoft.com>
(cherry picked from commit a9d1204e)
No related merge requests found
Showing with 10 additions and 10 deletions
+10 -10
...@@ -34,10 +34,10 @@ const pluginFileName = "plugin.yaml" ...@@ -34,10 +34,10 @@ const pluginFileName = "plugin.yaml"
// charts from special sources // charts from special sources
type Downloaders struct { type Downloaders struct {
// Protocols are the list of schemes from the charts URL. // Protocols are the list of schemes from the charts URL.
Protocols []string `json:"protocols"` Protocols []string `json:"protocols" yaml:"protocols"`
// Command is the executable path with which the plugin performs // Command is the executable path with which the plugin performs
// the actual download for the corresponding Protocols // the actual download for the corresponding Protocols
Command string `json:"command"` Command string `json:"command" yaml:"command"`
} }
// Metadata describes a plugin. // Metadata describes a plugin.
...@@ -45,16 +45,16 @@ type Downloaders struct { ...@@ -45,16 +45,16 @@ type Downloaders struct {
// This is the plugin equivalent of a chart.Metadata. // This is the plugin equivalent of a chart.Metadata.
type Metadata struct { type Metadata struct {
// Name is the name of the plugin // Name is the name of the plugin
Name string `json:"name"` Name string `json:"name" yaml:"name"`
// Version is a SemVer 2 version of the plugin. // Version is a SemVer 2 version of the plugin.
Version string `json:"version"` Version string `json:"version" yaml:"version"`
// Usage is the single-line usage text shown in help // Usage is the single-line usage text shown in help
Usage string `json:"usage"` Usage string `json:"usage" yaml:"usage"`
// Description is a long description shown in places like `helm help` // Description is a long description shown in places like `helm help`
Description string `json:"description"` Description string `json:"description" yaml:"description"`
// Command is the command, as a single string. // Command is the command, as a single string.
// //
...@@ -64,26 +64,26 @@ type Metadata struct { ...@@ -64,26 +64,26 @@ type Metadata struct {
// //
// Note that command is not executed in a shell. To do so, we suggest // Note that command is not executed in a shell. To do so, we suggest
// pointing the command to a shell script. // pointing the command to a shell script.
Command string `json:"command"` Command string `json:"command" yaml:"command"`
// IgnoreFlags ignores any flags passed in from Helm // IgnoreFlags ignores any flags passed in from Helm
// //
// For example, if the plugin is invoked as `helm --debug myplugin`, if this // For example, if the plugin is invoked as `helm --debug myplugin`, if this
// is false, `--debug` will be appended to `--command`. If this is true, // is false, `--debug` will be appended to `--command`. If this is true,
// the `--debug` flag will be discarded. // the `--debug` flag will be discarded.
IgnoreFlags bool `json:"ignoreFlags"` IgnoreFlags bool `json:"ignoreFlags" yaml:"ignoreFlags,omitempty"`
// UseTunnel indicates that this command needs a tunnel. // UseTunnel indicates that this command needs a tunnel.
// Setting this will cause a number of side effects, such as the // Setting this will cause a number of side effects, such as the
// automatic setting of HELM_HOST. // automatic setting of HELM_HOST.
UseTunnel bool `json:"useTunnel"` UseTunnel bool `json:"useTunnel" yaml:"useTunnel,omitempty"`
// Hooks are commands that will run on events. // Hooks are commands that will run on events.
Hooks Hooks Hooks Hooks
// Downloaders field is used if the plugin supply downloader mechanism // Downloaders field is used if the plugin supply downloader mechanism
// for special protocols. // for special protocols.
Downloaders []Downloaders `json:"downloaders"` Downloaders []Downloaders `json:"downloaders" yaml:"downloaders"`
} }
// Plugin represents a plugin. // Plugin represents a plugin.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment