config

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ContainerIDEnvVarName contains name of env variable passed from virtlet to vmwrapper
	ContainerIDEnvVarName = "VIRTLET_CONTAINER_ID"
	// CpusetsEnvVarName contains name of env variable passed from virtlet to vmwrapper
	CpusetsEnvVarName = "VIRTLET_CPUSETS"
	// EmulatorEnvVarName contains name of env variable passed from virtlet to vmwrapper
	EmulatorEnvVarName = "VIRTLET_EMULATOR"
	// LogPathEnvVarName contains name of env variable passed from virtlet to vmwrapper
	LogPathEnvVarName = "VIRTLET_CONTAINER_LOG_PATH"
	// NetKeyEnvVarName contains name of env variable passed from virtlet to vmwrapper
	NetKeyEnvVarName = "VIRTLET_NET_KEY"
)

Variables

This section is empty.

Functions

func DumpEnv

func DumpEnv(c *virtlet_v1.VirtletConfig) string

DumpEnv returns a string with environment variable settings corresponding to the VirtletConfig.

func GenerateDoc

func GenerateDoc() string

GenerateDoc generates a markdown document with a table describing all the configuration settings.

func GetCRDDefinitions

func GetCRDDefinitions() []runtime.Object

GetCRDDefinitions returns custom resource definitions for VirtletImageMapping kind in k8s.

func GetDefaultConfig

func GetDefaultConfig() *virtlet_v1.VirtletConfig

GetDefaultConfig returns a VirtletConfig with all values set to default

func MergeConfigs

func MergeConfigs(configs []*virtlet_v1.VirtletConfig) *virtlet_v1.VirtletConfig

MergeConfigs merges several Virtlet configs together, with configs going later taking precedence.

func Override

func Override(target, other *virtlet_v1.VirtletConfig)

Override replaces the values in the target config with those which are set in the other config.

Types

type Binder

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

Binder is used to extract Virtlet config from a FlagSet.

func NewBinder

func NewBinder(flagSet *flag.FlagSet) *Binder

NewBinder returns a new Binder.

func (*Binder) GetConfig

func (b *Binder) GetConfig() *virtlet_v1.VirtletConfig

GetConfig returns the config that only includes the fields that were explicitly set in the flags. It should be called after parsing the flags.

type NodeConfig

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

NodeConfig is used to retrieve Virtlet configuration for the current node.

func NewNodeConfig

func NewNodeConfig(clientCfg clientcmd.ClientConfig) *NodeConfig

NewNodeConfig creates a new NodeConfig

func (*NodeConfig) LoadConfig

func (nc *NodeConfig) LoadConfig(localConfig *virtlet_v1.VirtletConfig, nodeName string) (*virtlet_v1.VirtletConfig, error)

LoadConfig loads the configuration for the specified node.

Jump to

Keyboard shortcuts

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