Documentation ¶
Index ¶
- Constants
- type Syncer
- func (l *Syncer) CreateLoadBalancer(ing *v1beta1.Ingress, forceUpdate, validate bool, clusters []string) error
- func (l *Syncer) DeleteLoadBalancer(ing *v1beta1.Ingress, forceDelete bool) error
- func (l *Syncer) ListLoadBalancers() (string, error)
- func (l *Syncer) PrintStatus() (string, error)
- func (l *Syncer) RemoveFromClusters(ing *v1beta1.Ingress, removeClients map[string]kubeclient.Interface, ...) error
Constants ¶
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 ¶
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 ¶
ListLoadBalancers lists the existing load balancers. See interface for details.
func (*Syncer) PrintStatus ¶
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.