config

package
v1.21.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPIConfig

type CPIConfig struct {
	vcfg.Config
	Nodes Nodes
}

CPIConfig is used to read and store information (related only to the CPI) from the cloud configuration file

func ReadCPIConfig

func ReadCPIConfig(byConfig []byte) (*CPIConfig, error)

ReadCPIConfig parses vSphere cloud config file and stores it into CPIConfig. Environment variables are also checked

func ReadCPIConfigINI

func ReadCPIConfigINI(byConfig []byte) (*CPIConfig, error)

ReadCPIConfigINI parses vSphere cloud config file and stores it into CPIConfigYAML.

func ReadCPIConfigYAML

func ReadCPIConfigYAML(byConfig []byte) (*CPIConfig, error)

ReadCPIConfigYAML parses vSphere cloud config file and stores it into CPIConfigYAML.

func (*CPIConfig) FromCPIEnv

func (cfg *CPIConfig) FromCPIEnv() error

FromCPIEnv initializes the provided configuration object with values obtained from environment variables. If an environment variable is set for a property that's already initialized, the environment variable's value takes precedence.

type CPIConfigINI

type CPIConfigINI struct {
	vcfg.CommonConfigINI
	Nodes NodesINI
}

CPIConfigINI is the INI representation

func (*CPIConfigINI) CreateConfig

func (cci *CPIConfigINI) CreateConfig() *CPIConfig

CreateConfig generates a common Config object based on what other structs and funcs are already dependent upon in other packages.

type CPIConfigYAML

type CPIConfigYAML struct {
	vcfg.CommonConfigYAML
	Nodes NodesYAML
}

CPIConfigYAML is the YAML representation

func (*CPIConfigYAML) CreateConfig

func (ccy *CPIConfigYAML) CreateConfig() *CPIConfig

CreateConfig generates a common Config object based on what other structs and funcs are already dependent upon in other packages.

type Nodes

type Nodes struct {
	// IP address on VirtualMachine's network interfaces included in the fields' CIDRs
	// that will be used in respective status.addresses fields.
	InternalNetworkSubnetCIDR string
	ExternalNetworkSubnetCIDR string
	// IP address on VirtualMachine's VM Network names that will be used to when searching
	// for status.addresses fields. Note that if InternalNetworkSubnetCIDR and
	// ExternalNetworkSubnetCIDR are not set, then the vNIC associated to this network must
	// only have a single IP address assigned to it.
	InternalVMNetworkName string
	ExternalVMNetworkName string
}

Nodes captures internal/external networks

type NodesINI

type NodesINI struct {
	// IP address on VirtualMachine's network interfaces included in the fields' CIDRs
	// that will be used in respective status.addresses fields.
	InternalNetworkSubnetCIDR string `gcfg:"internal-network-subnet-cidr"`
	ExternalNetworkSubnetCIDR string `gcfg:"external-network-subnet-cidr"`
	// IP address on VirtualMachine's VM Network names that will be used to when searching
	// for status.addresses fields. Note that if InternalNetworkSubnetCIDR and
	// ExternalNetworkSubnetCIDR are not set, then the vNIC associated to this network must
	// only have a single IP address assigned to it.
	InternalVMNetworkName string `gcfg:"internal-vm-network-name"`
	ExternalVMNetworkName string `gcfg:"external-vm-network-name"`
}

NodesINI captures internal/external networks

type NodesYAML

type NodesYAML struct {
	// IP address on VirtualMachine's network interfaces included in the fields' CIDRs
	// that will be used in respective status.addresses fields.
	InternalNetworkSubnetCIDR string `yaml:"internalNetworkSubnetCidr"`
	ExternalNetworkSubnetCIDR string `yaml:"externalNetworkSubnetCidr"`
	// IP address on VirtualMachine's VM Network names that will be used to when searching
	// for status.addresses fields. Note that if InternalNetworkSubnetCIDR and
	// ExternalNetworkSubnetCIDR are not set, then the vNIC associated to this network must
	// only have a single IP address assigned to it.
	InternalVMNetworkName string `yaml:"internalVmNetworkName"`
	ExternalVMNetworkName string `yaml:"externalVmNetworkName"`
}

NodesYAML captures internal/external networks

Jump to

Keyboard shortcuts

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