Documentation ¶
Index ¶
Constants ¶
const ( // ClusterNameTagScope is the scope of clusterName tag // NSXT Tag includes scope and tag value, the format is a JSON map with name/value pair, // for example {"scope": "vsphere.k8s.io/cluster-name", "tag": "kubernetes-cluster-1"} ClusterNameTagScope = "vsphere.k8s.io/cluster-name" // NodeNameTagScope is the scope of nodeName tag // Node name tag will be used to identify static route belongs to which node, // for example {"scope": "vsphere.k8s.io/node-name", "tag": "worker-node-1"} NodeNameTagScope = "vsphere.k8s.io/node-name" // RealizedStateTimeout is the timeout duration for realized state check RealizedStateTimeout = 10 * time.Second // RealizedStateSleepTime is the interval between realized state check RealizedStateSleepTime = 1 * time.Second // RealizedState is the realized state RealizedState = "REALIZED" // DisplayNameMaxLength is the maximum length of static route display name DisplayNameMaxLength = 255 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Route RouteConfig NSXT nsxtcfg.NsxtConfig }
Config is used to read and store information from the cloud configuration file
func ReadConfigINI ¶
ReadConfigINI parses vSphere cloud config file and stores it into Config
func ReadConfigYAML ¶
ReadConfigYAML parses vSphere cloud config file and stores it into Config
func ReadRouteConfig ¶
ReadRouteConfig parses vSphere cloud config file and stores it into VSphereConfig. Environment variables are also checked
type RouteConfig ¶
type RouteConfig struct {
RouterPath string
}
RouteConfig contains the configuration for the route itself
func (*RouteConfig) FromEnv ¶
func (cfg *RouteConfig) FromEnv() error
FromEnv 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 RouteConfigINI ¶
type RouteConfigINI struct { Route RouteINI `gcfg:"route"` NSXT nsxtcfg.NsxtConfigINI `gcfg:"nsxt"` }
RouteConfigINI is used to read and store information from the cloud configuration file
func ReadRawConfigINI ¶
func ReadRawConfigINI(configData []byte) (*RouteConfigINI, error)
ReadRawConfigINI parses vSphere cloud config file and stores it into ConfigINI
func (*RouteConfigINI) CompleteAndValidate ¶
func (rci *RouteConfigINI) CompleteAndValidate() error
CompleteAndValidate sets default values, overrides by env and validates the resulting config
func (*RouteConfigINI) CreateConfig ¶
func (rci *RouteConfigINI) CreateConfig() *Config
CreateConfig generates a common Config object based on what other structs and funcs are already dependent upon in other packages.
type RouteConfigYAML ¶
type RouteConfigYAML struct { Route RouteYAML `yaml:"route"` NSXT nsxtcfg.NsxtConfigYAML `yaml:"nsxt"` }
RouteConfigYAML is used to read and store information from the cloud configuration file
func ReadRawConfigYAML ¶
func ReadRawConfigYAML(configData []byte) (*RouteConfigYAML, error)
ReadRawConfigYAML parses vSphere cloud config file and stores it into ConfigYAML
func (*RouteConfigYAML) CompleteAndValidate ¶
func (rcy *RouteConfigYAML) CompleteAndValidate() error
CompleteAndValidate sets default values, overrides by env and validates the resulting config
func (*RouteConfigYAML) CreateConfig ¶
func (rcy *RouteConfigYAML) CreateConfig() *Config
CreateConfig generates a common Config object based on what other structs and funcs are already dependent upon in other packages.