Help us shape the future of Go! Take the 2026 Go Developer Survey

flags

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: 3 Imported by: 0

Documentation

Overview

Package flags defines the shared CLI flag set used by the `d8 dist plugins` management subcommands and consumed when building the registry-packages-proxy client and enforcing cluster-side requirements.

Index

Constants

View Source
const (

	// Env* constants are the single source of truth for the environment variable
	// names: functional reads and help texts must reference them, never literals.
	EnvSkipClusterChecks = "D8_PLUGINS_SKIP_CLUSTER_CHECKS"

	// EnvPluginsDir overrides the plugins directory (same as --plugins-dir);
	// applied at command registration in cmd/d8/root.go.
	EnvPluginsDir = "DECKHOUSE_CLI_PATH"
)

Variables

View Source
var (
	DeckhousePluginsDir = defaultDeckhousePluginsDir

	// Kubeconfig and KubeContext locate the cluster; used to reach the
	// registry-packages-proxy and to enforce cluster-side plugin requirements
	// (Kubernetes/Deckhouse/module versions).
	Kubeconfig  = defaultKubeconfigPath()
	KubeContext string

	// SkipClusterChecks downgrades cluster-side requirement enforcement to a warning,
	// so a plugin that declares such a requirement can be installed without reaching
	// the cluster.
	SkipClusterChecks = skipClusterChecksDefault()
)
View Source
var (
	SourceRegistryRepo     string
	SourceRegistryLogin    string
	SourceRegistryPassword string
	DeckhouseLicenseToken  string

	Insecure      bool
	TLSSkipVerify bool
)

Legacy direct-registry parameters. All empty by default: an empty SourceRegistryRepo keeps RPP as the source, so the bypass is off unless --source is passed.

Functions

func AddFlags

func AddFlags(flagSet *pflag.FlagSet)

AddFlags registers the plugin-specific flags: the plugins directory and the cluster-checks toggle. Cluster access flags (kubeconfig/context, rpp-*) are registered separately, so a parent command can own them for a whole tree.

func AddKubeFlags added in v0.33.8

func AddKubeFlags(flagSet *pflag.FlagSet)

AddKubeFlags registers the kubeconfig/context pair that locates the cluster. The flags are bound to Kubeconfig/KubeContext, so reading them by flag name and through the package variables gives the same value.

func AddLegacySourceFlags added in v0.32.1

func AddLegacySourceFlags(flagSet *pflag.FlagSet)

AddLegacySourceFlags registers the hidden --source bypass flags on flagSet. They are hidden: the supported path is RPP, this is a temporary escape hatch.

Types

This section is empty.

Jump to

Keyboard shortcuts

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