vcloud

package
v0.0.0-...-eff0539 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HTTP  LbProtocol = "HTTP"
	HTTPS            = "HTTPS"
	TCP              = "TCP"
	UDP              = "UDP"
)
View Source
const (
	ROUND_ROBIN LbAlgorithm = "ROUND_ROBIN"
	IP_HASH                 = "IP_HASH"
	LEASTCONN               = "LEASTCONN"
	URI                     = "URI"
	HTTPHEADER              = "HTTPHEADER"
	URL                     = "URL"
)
View Source
const (
	IsWorkerNode = "node-role.kubernetes.io/worker"

	LoadBalancerType                     = "mk.plus.io/load-balancer-type"
	LoadBalancerExternalIP               = "mk.plus.io/load-balancer-external-ip"
	LoadBalancerPoolAlgorithm            = "mk.plus.io/pool-algorithm"
	LoadBalancerPoolMemberMinConnections = "mk.plus.io/pool-min-con"
	LoadBalancerPoolMemberMaxConnections = "mk.plus.io/pool-max-con"
)
View Source
const (
	VirtualServerDescription string = "This Service was automatically created and managed by vCloud-cloud-controller-manager"
	PoolDescription          string = "This Pool was automatically created and managed by vCloud-cloud-controller-manager"
)
View Source
const (
	ProviderName = "vCloud"
)

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)
View Source
var LbProtocols = []LbProtocol{
	HTTP,
	HTTPS,
	TCP,
	UDP,
}

Functions

func IsIpInRange

func IsIpInRange(testIp string, startIp string, endIp string) bool

Types

type Config

type Config struct {
	User        string `yaml:"user"`
	Password    string `yaml:"password"`
	Org         string `yaml:"org"`
	Href        string `yaml:"href"`
	VDC         string `yaml:"vdc"`
	Insecure    bool   `yaml:"insecure"`
	EdgeGateway string `yaml:"edgeGateway"`
}

func ReadConfig

func ReadConfig(config io.Reader) (*Config, error)

type FirewallConfig

type FirewallConfig struct {
	Source      types.EdgeFirewallEndpoint
	Destination types.EdgeFirewallEndpoint
	Application types.EdgeFirewallApplication
	// contains filtered or unexported fields
}

type IpAddress

type IpAddress struct {
	XMLName   xml.Name `xml:"IpAddress"`
	IpAddress string   `xml:"IpAddress"`
}

type IpAddressAllocation

type IpAddressAllocation struct {
	XMLName   xml.Name `xml:"AllocatedIpAddresses"`
	IpAddress []IpAddress
}

type LB

type LB struct {
	LoadBalancerOptions
	// contains filtered or unexported fields
}

func (*LB) CreatePool

func (loadBalancer *LB) CreatePool(pool *types.LbPool) (*types.LbPool, error)

func (*LB) CreateVirtualServer

func (loadBalancer *LB) CreateVirtualServer(name string, ip string, protocol LbProtocol, port int, applicationProfile string, poolName string) (*types.LbVirtualServer, error)

func (*LB) DeleteFirewallRule

func (loadBalancer *LB) DeleteFirewallRule(rule *types.EdgeFirewallRule) (bool, error)

func (*LB) DeleteLbServerPoolById

func (loadBalancer *LB) DeleteLbServerPoolById(id string) error

func (*LB) DeleteLbVirtualServerById

func (loadBalancer *LB) DeleteLbVirtualServerById(id string) error

func (*LB) EnsureLoadBalancer

func (loadBalancer *LB) EnsureLoadBalancer(ctx context.Context, clusterName string, service *corev1.Service, nodes []*corev1.Node) (*corev1.LoadBalancerStatus, error)

func (*LB) EnsureLoadBalancerDeleted

func (loadBalancer *LB) EnsureLoadBalancerDeleted(ctx context.Context, clusterName string, service *corev1.Service) error

func (*LB) GetFirewallRule

func (loadBalancer *LB) GetFirewallRule(name string) (*types.EdgeFirewallRule, error)

func (*LB) GetLoadBalancer

func (loadBalancer *LB) GetLoadBalancer(ctx context.Context, clusterName string, service *corev1.Service) (status *corev1.LoadBalancerStatus, exists bool, err error)

func (*LB) GetLoadBalancerByName

func (loadBalancer *LB) GetLoadBalancerByName(name string) (*types.LbVirtualServer, error)

func (*LB) GetLoadBalancerName

func (loadBalancer *LB) GetLoadBalancerName(ctx context.Context, clusterName string, service *corev1.Service) string

func (*LB) GetLoadBalancerPool

func (loadBalancer *LB) GetLoadBalancerPool(name string) (*types.LbPool, error)

func (*LB) GetNextAvailableIpAddressInVCloudNet

func (loadBalancer *LB) GetNextAvailableIpAddressInVCloudNet(networkName string, ipnet string) (string, error)

func (*LB) UpdateLoadBalancer

func (loadBalancer *LB) UpdateLoadBalancer(ctx context.Context, clusterName string, service *corev1.Service, nodes []*corev1.Node) error

func (*LB) UpdatePool

func (loadBalancer *LB) UpdatePool(pool *types.LbPool) (*types.LbPool, error)

type LbAlgorithm

type LbAlgorithm string

type LbProtocol

type LbProtocol string

type LoadBalancerOptions

type LoadBalancerOptions struct {
	LBVersion string
}

Jump to

Keyboard shortcuts

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