Documentation ¶
Index ¶
- Constants
- type ControllerContext
- func (ctx *ControllerContext) AddHealthCheck(id string, hc func() error)
- func (ctx *ControllerContext) HasSynced() bool
- func (ctx *ControllerContext) HealthCheck() HealthCheckResults
- func (ctx *ControllerContext) IngressesForBackendConfig(beConfig *backendconfigv1beta1.BackendConfig) (ingList []*extensions.Ingress)
- func (ctx *ControllerContext) IngressesForService(svc *apiv1.Service) (ingList []*extensions.Ingress)
- func (ctx *ControllerContext) Recorder(ns string) record.EventRecorder
- func (ctx *ControllerContext) Start(stopCh chan struct{})
- type ControllerContextConfig
- type HealthCheckResults
Constants ¶
const ( // Frequency to poll on local stores to sync. StoreSyncPollPeriod = 5 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerContext ¶
type ControllerContext struct { KubeClient kubernetes.Interface Cloud *gce.GCECloud ClusterNamer *utils.Namer ControllerContextConfig IngressInformer cache.SharedIndexInformer ServiceInformer cache.SharedIndexInformer BackendConfigInformer cache.SharedIndexInformer PodInformer cache.SharedIndexInformer NodeInformer cache.SharedIndexInformer EndpointInformer cache.SharedIndexInformer ManagedCertificateInformer cache.SharedIndexInformer // contains filtered or unexported fields }
ControllerContext holds the state needed for the execution of the controller.
func NewControllerContext ¶
func NewControllerContext( kubeClient kubernetes.Interface, backendConfigClient backendconfigclient.Interface, mcrtClient managedcertificatesclient.Interface, cloud *gce.GCECloud, namer *utils.Namer, config ControllerContextConfig) *ControllerContext
NewControllerContext returns a new shared set of informers.
func (*ControllerContext) AddHealthCheck ¶ added in v1.2.2
func (ctx *ControllerContext) AddHealthCheck(id string, hc func() error)
AddHealthCheck registers function to be called for healthchecking.
func (*ControllerContext) HasSynced ¶
func (ctx *ControllerContext) HasSynced() bool
HasSynced returns true if all relevant informers has been synced.
func (*ControllerContext) HealthCheck ¶ added in v1.2.2
func (ctx *ControllerContext) HealthCheck() HealthCheckResults
HealthCheck runs all registered healthcheck functions.
func (*ControllerContext) IngressesForBackendConfig ¶ added in v1.4.0
func (ctx *ControllerContext) IngressesForBackendConfig(beConfig *backendconfigv1beta1.BackendConfig) (ingList []*extensions.Ingress)
IngressesForBackendConfig gets all Ingresses that reference (indirectly) a BackendConfig. TODO(rramkumar): This can be optimized to remove nested loops.
func (*ControllerContext) IngressesForService ¶ added in v1.4.0
func (ctx *ControllerContext) IngressesForService(svc *apiv1.Service) (ingList []*extensions.Ingress)
IngressesForService gets all the Ingresses that reference a Service.
func (*ControllerContext) Recorder ¶
func (ctx *ControllerContext) Recorder(ns string) record.EventRecorder
Recorder return the event recorder for the given namespace.
func (*ControllerContext) Start ¶
func (ctx *ControllerContext) Start(stopCh chan struct{})
Start all of the informers.
type ControllerContextConfig ¶ added in v1.3.0
type ControllerContextConfig struct { NEGEnabled bool BackendConfigEnabled bool ManagedCertificateEnabled bool Namespace string ResyncPeriod time.Duration // DefaultBackendSvcPortID is the ServicePortID for the system default backend. DefaultBackendSvcPortID utils.ServicePortID HealthCheckPath string DefaultBackendHealthCheckPath string }
ControllerContextConfig encapsulates some settings that are tunable via command line flags.
type HealthCheckResults ¶ added in v1.2.2
HealthCheckResults contains a mapping of component -> health check results.