commands

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MPL-2.0 Imports: 79 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands []*cobra.Command

Commands is a list of commands published by the package.

View Source
var Config struct {
	RootDir       string
	GlobalOptions struct {
		Talosconfig string `yaml:"talosconfig"`
	} `yaml:"globalOptions"`
	TemplateOptions struct {
		Offline           bool     `yaml:"offline"`
		ValueFiles        []string `yaml:"valueFiles"`
		Values            []string `yaml:"values"`
		StringValues      []string `yaml:"stringValues"`
		FileValues        []string `yaml:"fileValues"`
		JsonValues        []string `yaml:"jsonValues"`
		LiteralValues     []string `yaml:"literalValues"`
		TalosVersion      string   `yaml:"talosVersion"`
		WithSecrets       string   `yaml:"withSecrets"`
		KubernetesVersion string   `yaml:"kubernetesVersion"`
		Full              bool     `yaml:"full"`
	} `yaml:"templateOptions"`
	ApplyOptions struct {
		DryRun           bool   `yaml:"preserve"`
		Timeout          string `yaml:"timeout"`
		TimeoutDuration  time.Duration
		CertFingerprints []string `yaml:"certFingerprints"`
	} `yaml:"applyOptions"`
	UpgradeOptions struct {
		Preserve bool `yaml:"preserve"`
		Stage    bool `yaml:"stage"`
		Force    bool `yaml:"force"`
	} `yaml:"upgradeOptions"`
	InitOptions struct {
		Version string
	}
}
View Source
var GlobalArgs global.Args

GlobalArgs is the common arguments for the root command.

Functions

func CompleteNodes added in v0.5.0

func CompleteNodes(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)

CompleteNodes represents tab completion for `--nodes` argument.

func WithClient

func WithClient(action func(context.Context, *client.Client) error, dialOptions ...grpc.DialOption) error

WithClient builds upon WithClientNoNodes to provide set of nodes on request context based on config & flags.

func WithClientMaintenance

func WithClientMaintenance(enforceFingerprints []string, action func(context.Context, *client.Client) error) error

WithClientMaintenance wraps common code to initialize Talos client in maintenance (insecure mode).

func WithClientNoNodes

func WithClientNoNodes(action func(context.Context, *client.Client) error, dialOptions ...grpc.DialOption) error

WithClientNoNodes wraps common code to initialize Talos client and provide cancellable context.

WithClientNoNodes doesn't set any node information on the request context.

Types

type WipeMode added in v0.5.0

WipeMode apply, patch, edit config update mode.

func (*WipeMode) Set added in v0.5.0

func (m *WipeMode) Set(value string) error

Set implements Flag interface.

func (WipeMode) String added in v0.5.0

func (m WipeMode) String() string

func (*WipeMode) Type added in v0.5.0

func (m *WipeMode) Type() string

Type implements Flag interface.

Jump to

Keyboard shortcuts

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