offload

package
v0.3.2-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package offload includes the logic for the `liqoctl offload` command

Index

Constants

View Source
const (
	// LiqoctlOffloadShortHelp contains the short help string for liqoctl Offload command.
	LiqoctlOffloadShortHelp = "Offload a namespace to remote clusters"
	// LiqoctlOffloadLongHelp contains the Long help string for liqoctl Offload command.
	LiqoctlOffloadLongHelp = `` /* 369-byte string literal not displayed */

	// UseCommand contains the verb of the Offload command.
	UseCommand = "offload"
	// ClusterResourceName contains the name of the resource offloaded in liqoctl Offload.
	ClusterResourceName = "namespace"
	// SuccessfulMessage is printed when a Offload cluster command has scucceded.
	SuccessfulMessage = `
	Success 👌!
`
	// PodOffloadingStrategyFlag specifies the pod offloading strategy flag name.
	PodOffloadingStrategyFlag = "pod-offloading-strategy"
	// PodOffloadingStrategyHelp specifies the help message for the PodOffloadingStrategy flag.
	PodOffloadingStrategyHelp = "Select the desired pod offloading strategy"
	// NamespaceMappingStrategyFlag specifies the namespace mapping flag name.
	NamespaceMappingStrategyFlag = "namespace-mapping-strategy"
	// NamespaceMappingStrategyHelp specifies the help message for the NamespaceMappingStrategy flag.
	NamespaceMappingStrategyHelp = "Select the desired pod offloading strategy"

	// AcceptedLabelsFlag specifies the accepted labels flag name.
	AcceptedLabelsFlag = "accepted-cluster-labels"
	// AcceptedLabelsDefault specifies the accepted default labels used to forge the clusterSelector field.
	AcceptedLabelsDefault = "liqo.io/type=virtual-node"
	// AcceptedLabelsHelp specifies the help message for the AcceptedLabels flag.
	AcceptedLabelsHelp = "The set of labels accepted as valid clusterLabels for the clusterSelector field"
	// DeniedLabelsFlag specifies the accepted labels flag name.
	DeniedLabelsFlag = "denied-cluster-labels"
	// DeniedLabelDefault specifies the denied default labels used to forge the clusterSelector field.
	DeniedLabelDefault = ""
	// DeniedLabelsHelp specifies the help message for the DeniedLabels flag.
	DeniedLabelsHelp = "The set of labels identified as forbidden clusterLabels for the clusterSelector field"
)

Variables

This section is empty.

Functions

func HandleOffloadCommand

func HandleOffloadCommand(ctx context.Context, command *cobra.Command, args []string) error

HandleOffloadCommand implements the "offload namespace" command. It forges and createOrUpdate a namespaceOffloading resource for a given namespace according to the flag values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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