Documentation ¶
Index ¶
- Constants
- func GCEResourceName(ingAnnotations map[string]string, resourceName string) string
- func GetCertHash(contents string) string
- func GetLBAnnotations(l7 *L7, existing map[string]string, backendSyncer backends.Syncer) (map[string]string, error)
- func InsertGlobalForwardingRuleHook(ctx context.Context, key *meta.Key, obj *compute.ForwardingRule, ...) (b bool, e error)
- type L7
- func (l *L7) Cleanup(versions *features.ResourceVersions) error
- func (l *L7) CreateKey(name string) (*meta.Key, error)
- func (l *L7) GetIP() string
- func (l *L7) Regional() bool
- func (l *L7) RuntimeInfo() *L7RuntimeInfo
- func (l *L7) UrlMap() *composite.UrlMap
- func (l *L7) Versions() *features.ResourceVersions
- type L7RuntimeInfo
- type L7s
- func (l *L7s) Delete(name string, versions *features.ResourceVersions, scope meta.KeyType) error
- func (l *L7s) Ensure(ri *L7RuntimeInfo) (*L7, error)
- func (l *L7s) GC(names []string) error
- func (l *L7s) List(key *meta.Key, version meta.Version) ([]*composite.UrlMap, error)
- func (l *L7s) Namer() *utils.Namer
- func (l *L7s) Shutdown() error
- type LoadBalancerPool
- type TLSCerts
Constants ¶
const ( // DefaultHost is the host used if none is specified. It is a valid value // for the "Host" field recognized by GCE. DefaultHost = "*" // DefaultPath is the path used if none is specified. It is a valid path // recognized by GCE. DefaultPath = "/*" )
const FakeCertQuota = 15
const SslCertificateMissing = "SslCertificateMissing"
const (
// Every target https proxy accepts upto 10 ssl certificates.
TargetProxyCertLimit = 10
)
Variables ¶
This section is empty.
Functions ¶
func GCEResourceName ¶
GCEResourceName retrieves the name of the gce resource created for this Ingress, of the given resource type, by inspecting the map of ingress annotations.
func GetCertHash ¶ added in v1.1.0
func GetLBAnnotations ¶
func GetLBAnnotations(l7 *L7, existing map[string]string, backendSyncer backends.Syncer) (map[string]string, error)
GetLBAnnotations returns the annotations of an l7. This includes it's current status.
func InsertGlobalForwardingRuleHook ¶ added in v1.7.0
Types ¶
type L7 ¶
type L7 struct { Name string // contains filtered or unexported fields }
L7 represents a single L7 loadbalancer.
func (*L7) Cleanup ¶
func (l *L7) Cleanup(versions *features.ResourceVersions) error
Cleanup deletes resources specific to this l7 in the right order. forwarding rule -> target proxy -> url map This leaves backends and health checks, which are shared across loadbalancers.
func (*L7) RuntimeInfo ¶ added in v1.2.2
func (l *L7) RuntimeInfo() *L7RuntimeInfo
RuntimeInfo returns the L7RuntimeInfo associated with the L7 load balancer.
func (*L7) Versions ¶ added in v1.7.0
func (l *L7) Versions() *features.ResourceVersions
Version() returns the struct listing the versions for every resource
type L7RuntimeInfo ¶
type L7RuntimeInfo struct { // Name is the name of a loadbalancer. Name string // IP is the desired ip of the loadbalancer, eg from a staticIP. IP string // TLS are the tls certs to use in termination. TLS []*TLSCerts // TLSName is the name of the preshared cert to use. Multiple certs can be specified as a comma-separated string TLSName string // Ingress is the processed Ingress API object. Ingress *v1beta1.Ingress // AllowHTTP will not setup :80, if TLS is nil and AllowHTTP is set, // no loadbalancer is created. AllowHTTP bool // The name of a Global Static IP. If specified, the IP associated with // this name is used in the Forwarding Rules for this loadbalancer. StaticIPName string // UrlMap is our internal representation of a url map. UrlMap *utils.GCEURLMap // FrontendConfig is the type which encapsulates features for the load balancer. FrontendConfig *frontendconfigv1beta1.FrontendConfig }
L7RuntimeInfo is info passed to this module from the controller runtime.
func (*L7RuntimeInfo) String ¶
func (l *L7RuntimeInfo) String() string
String returns the load balancer name
type L7s ¶
type L7s struct {
// contains filtered or unexported fields
}
L7s implements LoadBalancerPool.
func (*L7s) Ensure ¶ added in v1.5.0
func (l *L7s) Ensure(ri *L7RuntimeInfo) (*L7, error)
Ensure ensures a loadbalancer and its resources given the RuntimeInfo
func (*L7s) GC ¶
GC garbage collects loadbalancers not in the input list. TODO(shance): Update to handle regional and global LB with same name
func (*L7s) List ¶ added in v1.5.0
List returns a list of urlMaps (the top level LB resource) that belong to the cluster
type LoadBalancerPool ¶
type LoadBalancerPool interface { Ensure(ri *L7RuntimeInfo) (*L7, error) Delete(name string, versions *features.ResourceVersions, scope meta.KeyType) error GC(names []string) error Shutdown() error List(key *meta.Key, version meta.Version) ([]*composite.UrlMap, error) }
LoadBalancerPool is an interface to manage the cloud resources associated with a gce loadbalancer.
func NewLoadBalancerPool ¶
func NewLoadBalancerPool(cloud *gce.Cloud, namer *utils.Namer, recorderProducer events.RecorderProducer) LoadBalancerPool
NewLoadBalancerPool returns a new loadbalancer pool.
- cloud: implements LoadBalancers. Used to sync L7 loadbalancer resources with the cloud.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
TODO: (shance) this file should ideally be combined with backends/features This file contains functionality and constants for the L7-ILB feature Since this also currently affects backend resources (since they are alpha-regional instead of ga-global), this feature is also included in pkg/backends/features.go
|
TODO: (shance) this file should ideally be combined with backends/features This file contains functionality and constants for the L7-ILB feature Since this also currently affects backend resources (since they are alpha-regional instead of ga-global), this feature is also included in pkg/backends/features.go |