Documentation ¶
Index ¶
Constants ¶
View Source
const ( // SyncPeriod is how often the syncer will attempt to // reconcile the expected Service states. SyncPeriod = 5 * time.Second // ServicePollPeriod is how often a Service is checked for // whether it has instances to reap. ServicePollPeriod = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GatewayResource ¶
type GatewayResource struct { Service *ServiceResource // contains filtered or unexported fields }
GatewayResource implements controller.Resource and starts a background watcher o gateway to keep track of changing gateway.
func (*GatewayResource) Delete ¶
func (gw *GatewayResource) Delete(key string, raw interface{}) error
func (*GatewayResource) Informer ¶
func (gw *GatewayResource) Informer() cache.SharedIndexInformer
func (*GatewayResource) Upsert ¶
func (gw *GatewayResource) Upsert(key string, raw interface{}) error
type GatewayRouteSyncer ¶
type GatewayRouteSyncer struct { SyncPeriod time.Duration ServicePollPeriod time.Duration GatewayResource *GatewayResource // contains filtered or unexported fields }
GatewayRouteSyncer is a Syncer that takes the set of gateway routes.
func (*GatewayRouteSyncer) Run ¶
func (s *GatewayRouteSyncer) Run(ctx context.Context, ctrls ...*connector.Controller)
Run is the long-running runloop for reconciling the local set of services to register with the remote state.
func (*GatewayRouteSyncer) Sync ¶
func (s *GatewayRouteSyncer) Sync(rs []*corev1.Service)
Sync implements Syncer.
type ServiceResource ¶
type ServiceResource struct { FsmNamespace string Client kubernetes.Interface GatewayClient gwapi.Interface // Ctx is used to cancel processes kicked off by ServiceResource. Ctx context.Context // AllowK8sNamespacesSet is a set of k8s namespaces to explicitly allow for // syncing. It supports the special character `*` which indicates that // all k8s namespaces are eligible unless explicitly denied. This filter // is applied before checking pod annotations. AllowK8sNamespacesSet mapset.Set // DenyK8sNamespacesSet is a set of k8s namespaces to explicitly deny // syncing and thus Service registration with Consul. An empty set // means that no namespaces are removed from consideration. This filter // takes precedence over AllowK8sNamespacesSet. DenyK8sNamespacesSet mapset.Set // ExplictEnable should be set to true to require explicit enabling // using annotations. If this is false, then services are implicitly // enabled (aka default enabled). ExplicitEnable bool GatewayResource *GatewayResource Syncer Syncer // contains filtered or unexported fields }
ServiceResource implements controller.Resource to sync CatalogService resource types from K8S.
func (*ServiceResource) Delete ¶
func (t *ServiceResource) Delete(key string, _ interface{}) error
Delete implements the controller.Resource interface.
func (*ServiceResource) Informer ¶
func (t *ServiceResource) Informer() cache.SharedIndexInformer
Informer implements the controller.Resource interface.
func (*ServiceResource) Run ¶
func (t *ServiceResource) Run(ch <-chan struct{})
Run implements the controller.Backgrounder interface.
func (*ServiceResource) Upsert ¶
func (t *ServiceResource) Upsert(key string, raw interface{}) error
Upsert implements the controller.Resource interface.
Click to show internal directories.
Click to hide internal directories.