Documentation ¶
Index ¶
- Constants
- type ControllerContext
- func (ctx *ControllerContext) AddHealthCheck(id string, hc func() error)
- func (ctx *ControllerContext) BackendConfigs() *typed.BackendConfigStore
- func (ctx *ControllerContext) FrontendConfigs() *typed.FrontendConfigStore
- func (ctx *ControllerContext) HasSynced() bool
- func (ctx *ControllerContext) HealthCheck() HealthCheckResults
- func (ctx *ControllerContext) Ingresses() *typed.IngressStore
- func (ctx *ControllerContext) Init()
- func (ctx *ControllerContext) Recorder(ns string) record.EventRecorder
- func (ctx *ControllerContext) Services() *typed.ServiceStore
- 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 { KubeConfig *rest.Config KubeClient kubernetes.Interface SvcNegClient svcnegclient.Interface DestinationRuleClient dynamic.NamespaceableResourceInterface Cloud *gce.Cloud ClusterNamer *namer.Namer KubeSystemUID types.UID L4Namer namer.L4ResourcesNamer ControllerContextConfig ASMConfigController *cmconfig.ConfigMapConfigController IngressInformer cache.SharedIndexInformer ServiceInformer cache.SharedIndexInformer BackendConfigInformer cache.SharedIndexInformer FrontendConfigInformer cache.SharedIndexInformer PodInformer cache.SharedIndexInformer NodeInformer cache.SharedIndexInformer EndpointInformer cache.SharedIndexInformer DestinationRuleInformer cache.SharedIndexInformer ConfigMapInformer cache.SharedIndexInformer SvcNegInformer cache.SharedIndexInformer ControllerMetrics *metrics.ControllerMetrics // contains filtered or unexported fields }
ControllerContext holds the state needed for the execution of the controller.
func NewControllerContext ¶
func NewControllerContext( kubeConfig *rest.Config, kubeClient kubernetes.Interface, backendConfigClient backendconfigclient.Interface, frontendConfigClient frontendconfigclient.Interface, svcnegClient svcnegclient.Interface, cloud *gce.Cloud, clusterNamer *namer.Namer, kubeSystemUID types.UID, 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) BackendConfigs ¶ added in v1.5.0
func (ctx *ControllerContext) BackendConfigs() *typed.BackendConfigStore
BackendConfigs returns the store of BackendConfigs.
func (*ControllerContext) FrontendConfigs ¶ added in v1.6.0
func (ctx *ControllerContext) FrontendConfigs() *typed.FrontendConfigStore
FrontendConfigs returns the store of FrontendConfigs.
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) Ingresses ¶ added in v1.5.0
func (ctx *ControllerContext) Ingresses() *typed.IngressStore
Ingresses returns the store of Ingresses.
func (*ControllerContext) Init ¶ added in v1.8.0
func (ctx *ControllerContext) Init()
Init inits the Context, so that we can defers some config until the main thread enter actually get the leader lock.
func (*ControllerContext) Recorder ¶
func (ctx *ControllerContext) Recorder(ns string) record.EventRecorder
Recorder return the event recorder for the given namespace.
func (*ControllerContext) Services ¶ added in v1.5.0
func (ctx *ControllerContext) Services() *typed.ServiceStore
Services returns the store of Services.
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 { Namespace string ResyncPeriod time.Duration // DefaultBackendSvcPortID is the ServicePort for the system default backend. DefaultBackendSvcPort utils.ServicePort HealthCheckPath string FrontendConfigEnabled bool EnableASMConfigMap bool ASMConfigMapNamespace string ASMConfigMapName 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.