Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecCmd ¶
func ExecCmd(ctx context.Context, kubeConfig *rest.Config, kubeClient *kubernetes.Clientset, name, namespace, container, command string, args ...string) (int, []byte, error)
ExecCmd exec command on specific pod and wait the command's output.
func RegisterTestFlags ¶
func RegisterTestFlags(config *Config)
Types ¶
type Config ¶
type Config struct { KubeConfigPath string `yaml:"kube-config-path,omitempty"` // 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 LoadFromConfigMap ¶
func LoadFromConfigMap(kubeConfigPath 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", "pod" 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"` }
Click to show internal directories.
Click to hide internal directories.