Documentation ¶
Index ¶
- func GetFnCommand(ctx context.Context, name string) *cobra.Command
- func GetKptCommands(ctx context.Context, name string, f util.Factory) []*cobra.Command
- func GetLiveCommand(name string, f util.Factory) *cobra.Command
- func GetPkgCommand(ctx context.Context, name string) *cobra.Command
- func NewCmdInstallRG(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdMigrate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NormalizeCommand(c ...*cobra.Command)
- type ApplyRunnerWrapper
- type InstallRGRunner
- type MigrateRunner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKptCommands ¶
GetKptCommands returns the set of kpt commands to be registered
func NewCmdInstallRG ¶ added in v0.38.0
NewCmdInstallRG returns the cobra command for the install-resource-group command.
func NewCmdMigrate ¶ added in v0.37.0
NewCmdMigrate returns the cobra command for the migrate command.
func NormalizeCommand ¶
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
func GetApplyRunner(provider provider.Provider, loader manifestreader.ManifestLoader, ioStreams genericclioptions.IOStreams) *ApplyRunnerWrapper
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
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
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.