pull/32236/merge
haoshengzhen 2 days ago committed by GitHub
commit d126a1b149
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -24,7 +24,7 @@ import "time"
type Dependency struct {
// Name is the name of the dependency.
//
// This must mach the name in the dependency's Chart.yaml.
// This must match the name in the dependency's Chart.yaml.
Name string `json:"name" yaml:"name"`
// Version is the version (range) of this chart.
//

@ -244,7 +244,7 @@ func writeToTar(out *tar.Writer, name string, body []byte, modTime time.Time) er
return err
}
// If the name has directory name has characters which would change the location
// If the directory name has characters which would change the location
// they need to be removed.
func validateName(name string) error {
nname := filepath.Base(name)

@ -49,7 +49,7 @@ for _, plg := range plgs {
Package `plugin` provides the implementation of the Helm plugin system.
Helm plugins are exposed to uses as the "Plugin" type, the basic interface that primarily support the "Invoke" method.
Helm plugins are exposed to users as the "Plugin" type, the basic interface that primarily supports the "Invoke" method.
# Plugin Runtimes
Internally, plugins must be implemented by a "runtime" that is responsible for creating the plugin instance, and dispatching the plugin's invocation to the plugin's implementation.
@ -81,9 +81,9 @@ For legacy plugins, the type is inferred by which fields are set on the plugin:
For v1 plugins, the metadata includes explicit apiVersion and type fields. It will also contain type-specific Config, and RuntimeConfig fields.
# Runtime and type cardinality
From a cardinality perspective, this means there a "few" runtimes, and "many" plugins types. It is also expected that the subprocess runtime will not be extended to support extra plugin types, and deprecated in a future version of Helm.
From a cardinality perspective, this means there are a "few" runtimes, and "many" plugin types. It is also expected that the subprocess runtime will not be extended to support extra plugin types, and deprecated in a future version of Helm.
Future ideas that are intended to be implemented include extending the plugin system to support future Wasm standards. Or allowing Helm SDK user's to inject "plugins" that are actually implemented as native go modules. Or even moving Helm's internal functionality e.g. yaml rendering engine to be used as an "in-built" plugin, along side other plugins that may implement other (non-go template) rendering engines.
Future ideas that are intended to be implemented include extending the plugin system to support future Wasm standards. Or allowing Helm SDK users to inject "plugins" that are actually implemented as native go modules. Or even moving Helm's internal functionality e.g. yaml rendering engine to be used as an "in-built" plugin, alongside other plugins that may implement other (non-go template) rendering engines.
*/
package plugin

@ -44,7 +44,7 @@ type HTTPInstaller struct {
provData []byte
}
// NewHTTPInstaller creates a new HttpInstaller.
// NewHTTPInstaller creates a new HTTPInstaller.
func NewHTTPInstaller(source string) (*HTTPInstaller, error) {
key, err := cache.Key(source)
if err != nil {

@ -31,7 +31,7 @@ import (
"helm.sh/helm/v4/pkg/helmpath"
)
// VCSInstaller installs plugins from remote a repository.
// VCSInstaller installs plugins from a remote repository.
type VCSInstaller struct {
Repo vcs.Repo
Version string
@ -166,7 +166,7 @@ func (i *VCSInstaller) sync(repo vcs.Repo) error {
return repo.Update()
}
// Filter a list of versions to only included semantic versions. The response
// Filter a list of versions to only include semantic versions. The response
// is a mapping of the original version to the semantic version.
func getSemVers(refs []string) []*semver.Version {
var sv []*semver.Version

@ -16,7 +16,7 @@ limitations under the License.
/*
This file contains a "registry" of supported plugin types.
It enables "dyanmic" operations on the go type associated with a given plugin type (see: `helm.sh/helm/v4/internal/plugin/schema` package)
It enables "dynamic" operations on the go type associated with a given plugin type (see: `helm.sh/helm/v4/internal/plugin/schema` package)
Examples:

@ -22,7 +22,7 @@ import (
"go.yaml.in/yaml/v3"
)
// Runtime represents a plugin runtime (subprocess, extism, etc) ie. how a plugin should be executed
// Runtime represents a plugin runtime (subprocess, extism, etc) i.e. how a plugin should be executed
// Runtime is responsible for instantiating plugins that implement the runtime
// TODO: could call this something more like "PluginRuntimeCreator"?
type Runtime interface {
@ -34,7 +34,7 @@ type Runtime interface {
}
// RuntimeConfig represents the assertable type for a plugin's runtime configuration.
// It is expected to type assert (cast) the a RuntimeConfig to its expected type
// It is expected to type assert (cast) a RuntimeConfig to its expected type
type RuntimeConfig interface {
Validate() error
}

@ -46,7 +46,7 @@ type Release struct {
// Namespace is the kubernetes namespace of the release.
Namespace string `json:"namespace,omitempty"`
// Labels of the release.
// Disabled encoding into Json cause labels are stored in storage driver metadata field.
// Disabled encoding into JSON because labels are stored in storage driver metadata field.
Labels map[string]string `json:"-"`
// ApplyMethod stores whether server-side or client-side apply was used for the release
// Unset (empty string) should be treated as the default of client-side apply

Loading…
Cancel
Save