loadbalancer

package
v0.0.0-...-ef552c2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2019 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MciPrefix is the prefix used by namer to generate names.
	// This is used to identify resources created by this code.
	MciPrefix = "mci1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

Syncer manages the GCP resources necessary for an L7 GCP Load balancer.

func NewLoadBalancerSyncer

func NewLoadBalancerSyncer(lbName string, clients map[string]kubeclient.Interface, cloud *gce.GCECloud, gcpProjectID string) (*Syncer, error)

NewLoadBalancerSyncer returns a new instance of Syncer.

func (*Syncer) CreateLoadBalancer

func (l *Syncer) CreateLoadBalancer(ing *v1beta1.Ingress, forceUpdate, validate bool, clusters []string) error

CreateLoadBalancer creates the GCP resources necessary for an L7 GCP load balancer corresponding to the given ingress. clusters is the list of clusters that this load balancer is spread to.

func (*Syncer) DeleteLoadBalancer

func (l *Syncer) DeleteLoadBalancer(ing *v1beta1.Ingress, forceDelete bool) error

DeleteLoadBalancer deletes the GCP resources associated with the L7 GCP load balancer for the given ingress. Continues in case of errors and deletes the resources that it can when forceDelete is set to true. TODO(nikhiljindal): Do not require the ingress yaml from users. Just the name should be enough. We can fetch ingress YAML from one of the clusters.

func (*Syncer) ListLoadBalancers

func (l *Syncer) ListLoadBalancers() (string, error)

ListLoadBalancers lists the existing load balancers. See interface for details.

func (*Syncer) PrintStatus

func (l *Syncer) PrintStatus() (string, error)

PrintStatus prints the current status of the load balancer.

func (*Syncer) RemoveFromClusters

func (l *Syncer) RemoveFromClusters(ing *v1beta1.Ingress, removeClients map[string]kubeclient.Interface, forceUpdate bool) error

RemoveFromClusters removes the given ingress from the clusters corresponding to the given clients. TODO(nikhiljindal): Do not require the ingress yaml from users. Just the name should be enough. We can fetch ingress YAML from one of the clusters.

Jump to

Keyboard shortcuts

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