config

package
v1.23.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
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
}

Config is used to read and store information from the cloud configuration file

func ReadConfigINI

func ReadConfigINI(configData []byte) (*Config, error)

ReadConfigINI parses vSphere cloud config file and stores it into Config

func ReadConfigYAML

func ReadConfigYAML(configData []byte) (*Config, error)

ReadConfigYAML parses vSphere cloud config file and stores it into Config

func ReadRouteConfig

func ReadRouteConfig(configData []byte) (*Config, error)

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

type RouteConfigINI

type RouteConfigINI struct {
	Route RouteINI `gcfg:"route"`
}

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"`
}

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.

type RouteINI

type RouteINI struct {
	RouterPath string `gcfg:"router-path"`
}

RouteINI contains the configuration for route

type RouteYAML

type RouteYAML struct {
	RouterPath string `yaml:"routerPath"`
}

RouteYAML contains the configuration for route

Jump to

Keyboard shortcuts

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