pluginscmd

package
v0.33.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package pluginscmd implements the `d8 dist plugins` command tree and the per-plugin wrapper command on top of the internal/plugins machinery.

d8 dist plugins list       list installed plugins
d8 dist plugins versions   list published versions of a plugin
d8 dist plugins contract   show a plugin's contract
d8 dist plugins install    install a plugin, or update one (--all: every installed)
d8 dist plugins remove     remove an installed plugin

The subtree is mounted under `d8 dist` (internal/dist/cmd) and inherits the cluster access flags (kubeconfig/context, rpp-*) from it. File layout: one command per file, plugin.go holds the per-plugin wrapper (e.g. `d8 system`).

Index

Constants

View Source
const (
	SystemPluginName  = "system"
	PackagePluginName = "package"
)

SystemPluginName and PackagePluginName name the two capabilities that are both overridable commands and possible plugin dependencies (see overridableCommands in cmd/d8/root.go): each is served by an installed plugin of that name, or by its built-in implementation when no such plugin is installed. While `package` is served by the built-in it is passed to SetBuiltinCommands, so a plugin depending on "package" is satisfied without a registry lookup.

Variables

This section is empty.

Functions

func NewCommand

func NewCommand(logger *dkplog.Logger, builtinCommands []string) *cobra.Command

NewCommand returns the `d8 dist plugins` command tree for managing plugins. builtinCommands are built-in command names that satisfy a plugin dependency of the same name (e.g. delivery-kit) until such capabilities ship as standalone plugins.

func NewPluginCommand

func NewPluginCommand(commandName, description string, aliases []string, logger *dkplog.Logger, opts ...PluginCommandOption) *cobra.Command

NewPluginCommand returns the wrapper command that runs an installed plugin (e.g. `d8 system`), installing it first when missing.

Types

type PluginCommandOption added in v0.33.15

type PluginCommandOption func(*pluginCommandOptions)

PluginCommandOption configures the wrapper returned by NewPluginCommand.

func WithInstallRoot added in v0.33.15

func WithInstallRoot(root string) PluginCommandOption

WithInstallRoot pins the wrapper to an install root already known to hold the plugin, skipping the EnsureInstallRoot probe and its home-fallback switch.

Without it the wrapper starts from the configured root, which is the wrong one whenever the installs live in the ~/.deckhouse-cli fallback: EnsureInstallRoot switches over only on a permission error, so a configured root that exists but is empty keeps the wrapper looking in a directory holding no plugin at all.

Directories

Path Synopsis
Package errdetect maps registry-packages-proxy failures from `d8 dist plugins` to HelpfulErrors with plugin-specific guidance.
Package errdetect maps registry-packages-proxy failures from `d8 dist plugins` to HelpfulErrors with plugin-specific guidance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL