Documentation ¶
Index ¶
- Constants
- func DumpEnv(c *virtlet_v1.VirtletConfig) string
- func GenerateDoc() string
- func GetCRDDefinitions() []runtime.Object
- func GetDefaultConfig() *virtlet_v1.VirtletConfig
- func MergeConfigs(configs []*virtlet_v1.VirtletConfig) *virtlet_v1.VirtletConfig
- func Override(target, other *virtlet_v1.VirtletConfig)
- type Binder
- type NodeConfig
Constants ¶
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 ¶
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 (*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.