config

package
v0.0.0-...-e1628ab Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// KubeConfig connect to kube-apiserver
	KubeConfig *rest.Config `yaml:"kube-config,omitempty"`
	// TowerClient connect to tower
	TowerClient *client.Client `yaml:"tower-client,omitempty"`

	Endpoint     EndpointConfig     `yaml:"endpoint"`
	GlobalPolicy GlobalPolicyConfig `yaml:"globalPolicy,omitempty"`
	Nodes        NodesConfig        `yaml:"nodes,omitempty"`
	IPAM         *IPAMConfig        `yaml:"ipam,omitempty"`
	Timeout      *time.Duration     `yaml:"timeout,omitempty"`
	Interval     *time.Duration     `yaml:"interval,omitempty"`

	// In which namespace are endpoints and policies created
	Namespace string `yaml:"namespace,omitempty"`
}

Config of everoute e2e framework

func LoadDefault

func LoadDefault(kubeConfig string) (*Config, error)

func LoadFromConfigMap

func LoadFromConfigMap(kubeConfig string, namespacedName types.NamespacedName) (*Config, error)

type EndpointConfig

type EndpointConfig struct {
	// if provider is netns and kubeConfig is empty, config.KubeConfig will use
	KubeConfig *rest.Config `yaml:"kube-config,omitempty"`
	// if provider is tower and towerClient is empty, config.TowerClient will use
	TowerClient *client.Client `yaml:"tower-client,omitempty"`

	// Endpoint Provider, must "tower", "netns" or nil, default netns
	Provider *string `yaml:"provider,omitempty"`
	// template for create vm, only valid when provider is tower
	VMTemplateID *string `yaml:"vm-template-id,omitempty"`
	// create vm in the specify vds, only valid when provider is tower
	VdsID *string `yaml:"vds-id,omitempty"`
}

type GlobalPolicyConfig

type GlobalPolicyConfig struct {
	// if provider is netns and kubeConfig is empty, config.KubeConfig will use
	KubeConfig *rest.Config `yaml:"kube-config,omitempty"`
	// if provider is tower and towerClient is empty, config.TowerClient will use
	TowerClient *client.Client `yaml:"tower-client,omitempty"`

	// Endpoint Provider, must "tower", "kubernetes" or nil, default kubernetes
	Provider *string `yaml:"provider,omitempty"`
	// update the specified ERCluster global action, only valid when provider is tower
	EverouteClusterID *string `yaml:"everouteClusterID,omitempty"`
}

type IPAMConfig

type IPAMConfig struct {
	IPRange string `yaml:"ip-range"`
}

type NodeConfig

type NodeConfig struct {
	Name           string   `yaml:"name"`
	Roles          []string `yaml:"roles,omitempty"`
	User           string   `yaml:"user,omitempty"`
	DialAddress    string   `yaml:"dial-address,omitempty"`
	Password       *string  `yaml:"password,omitempty"`
	PrivateKeyData *string  `yaml:"private-key-data,omitempty"`
	BridgeName     *string  `yaml:"bridge-name,omitempty"`
}

type NodesConfig

type NodesConfig struct {
	DisableAgentRestarter      bool         `yaml:"disableAgentRestarter,omitempty"`
	DisableControllerRestarter bool         `yaml:"disableControllerRestarter,omitempty"`
	Instances                  []NodeConfig `yaml:"instances,omitempty"`
}

Jump to

Keyboard shortcuts

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