commands

package
v1.0.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: Apache-2.0 Imports: 44 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFnCommand

func GetFnCommand(ctx context.Context, name string) *cobra.Command

func GetKptCommands

func GetKptCommands(ctx context.Context, name, version string) []*cobra.Command

GetKptCommands returns the set of kpt commands to be registered

func GetLiveCommand

func GetLiveCommand(_, version string) *cobra.Command

func GetPkgCommand

func GetPkgCommand(ctx context.Context, name string) *cobra.Command

func NewCmdInstallRG added in v0.38.0

func NewCmdInstallRG(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdInstallRG returns the cobra command for the install-resource-group command.

func NewCmdMigrate added in v0.37.0

func NewCmdMigrate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command

NewCmdMigrate returns the cobra command for the migrate command.

func NormalizeCommand

func NormalizeCommand(c ...*cobra.Command)

NormalizeCommand will modify commands to be consistent, e.g. silencing errors

Types

type ApplyRunnerWrapper added in v0.38.0

type ApplyRunnerWrapper struct {
	// contains filtered or unexported fields
}

ApplyRunnerWrapper encapsulates the cli-utils apply command ApplyRunner as well as structures necessary to run.

func GetApplyRunner added in v0.38.0

Get ApplyRunner returns a wrapper around the cli-utils apply command ApplyRunner. Sets up the Run on this wrapped runner to be the ApplyRunnerWrapper run.

func (*ApplyRunnerWrapper) Command added in v0.38.0

func (w *ApplyRunnerWrapper) Command() *cobra.Command

Command returns the wrapped ApplyRunner cobraCommand structure.

func (*ApplyRunnerWrapper) RunE added in v0.38.0

func (w *ApplyRunnerWrapper) RunE(cmd *cobra.Command, args []string) error

RunE delegates to the stored applyRunner. Before the delegation, this function either applies the inventory ResourceGroup CRD (--apply-inventory-crd flag), or checks if the inventory ResourceGroup CRD is available. Returns an error if one occurs in the delegation.

type InstallRGRunner added in v0.38.0

type InstallRGRunner struct {
	Command *cobra.Command
	// contains filtered or unexported fields
}

InstallRGRunner encapsulates fields for the kpt live install-resource-group command.

func GetInstallRGRunner added in v0.38.0

func GetInstallRGRunner(factory cmdutil.Factory, ioStreams genericclioptions.IOStreams) *InstallRGRunner

GetInstallRGRunner returns a pointer to an initial InstallRGRunner structure.

func (*InstallRGRunner) Run added in v0.38.0

func (ir *InstallRGRunner) Run(reader io.Reader, args []string) error

Run executes the installation of the ResourceGroup custom resource definition. Uses the current context of the kube config file (or the kube config flags) to determine the APIServer to install the CRD.

type MigrateRunner added in v0.37.0

type MigrateRunner struct {
	Command *cobra.Command
	// contains filtered or unexported fields
}

MigrateRunner encapsulates fields for the kpt migrate command.

func GetMigrateRunner added in v0.37.0

func GetMigrateRunner(cmProvider provider.Provider, rgProvider provider.Provider,
	cmLoader manifestreader.ManifestLoader, rgLoader manifestreader.ManifestLoader,
	ioStreams genericclioptions.IOStreams) *MigrateRunner

NewMigrateRunner returns a pointer to an initial MigrateRunner structure.

func (*MigrateRunner) Run added in v0.37.0

func (mr *MigrateRunner) Run(reader io.Reader, args []string) error

Run executes the migration from the ConfigMap based inventory to the ResourceGroup based inventory.

Jump to

Keyboard shortcuts

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