Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSkipBackendsSync = errors.New("ingress skip backends sync and beyond")
ErrSkipBackendsSync is an error that can be returned by a Controller to indicate that syncing of backends was skipped and that all other future processes should be skipped as well.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller interface { // SyncBackends syncs the backends for a GCLB given some existing state. SyncBackends(state interface{}) error // GCBackends garbage collects backends for all ingresses given a list of ingresses to exclude from GC. GCBackends(toKeep []*v1beta1.Ingress) error // SyncLoadBalancer syncs the front-end load balancer resources for a GCLB given some existing state. SyncLoadBalancer(state interface{}) error // GCv1LoadBalancers garbage collects front-end load balancer resources for all ingresses // given a list of ingresses with v1 naming policy to exclude from GC. GCv1LoadBalancers(toKeep []*v1beta1.Ingress) error // GCv2LoadBalancer garbage collects front-end load balancer resources for given ingress // with v2 naming policy. GCv2LoadBalancer(ing *v1beta1.Ingress, scope meta.KeyType) error // PostProcess allows for doing some post-processing after an Ingress is synced to a GCLB. PostProcess(state interface{}) error // EnsureDeleteV1Finalizers ensures that v1 finalizers are removed for given list of ingresses. EnsureDeleteV1Finalizers(toCleanup []*v1beta1.Ingress) error // EnsureDeleteV2Finalizer ensures that v2 finalizer is removed for given ingress. EnsureDeleteV2Finalizer(ing *v1beta1.Ingress) error }
Controller is an interface for ingress controllers and declares methods on how to sync the various portions of the GCLB for an Ingress.
type IngressSyncer ¶
type IngressSyncer struct {
// contains filtered or unexported fields
}
IngressSyncer processes an Ingress spec and produces a load balancer given an implementation of Controller.
func (*IngressSyncer) GC ¶
func (s *IngressSyncer) GC(ings []*v1beta1.Ingress, currIng *v1beta1.Ingress, frontendGCAlgorithm utils.FrontendGCAlgorithm, scope meta.KeyType) error
GC implements Syncer.
func (*IngressSyncer) Sync ¶
func (s *IngressSyncer) Sync(state interface{}) error
Sync implements Syncer.
type Syncer ¶
type Syncer interface { // Sync creates a full GCLB given some state related to an Ingress. Sync(state interface{}) error // GC cleans up GCLB resources for all Ingresses and can optionally // use some arbitrary to help with the process. // GC workflow performs frontend resource deletion based on given gc algorithm. // TODO(rramkumar): Do we need to rethink the strategy of GC'ing // all Ingresses at once? GC(ings []*v1beta1.Ingress, currIng *v1beta1.Ingress, frontendGCAlgorithm utils.FrontendGCAlgorithm, scope meta.KeyType) error }
Syncer is an interface to sync GCP resources associated with an Ingress.
func NewIngressSyncer ¶
func NewIngressSyncer(controller Controller) Syncer
Click to show internal directories.
Click to hide internal directories.