controllers

package
v0.0.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2017 License: Apache-2.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KUBE_DUMMY_IF      = "kube-dummy-if"
	KUBE_TUNNEL_IF     = "kube-tunnel-if"
	IFACE_NOT_FOUND    = "Link not found"
	IFACE_HAS_ADDR     = "file exists"
	IFACE_HAS_NO_ADDR  = "cannot assign requested address"
	IPVS_SERVER_EXISTS = "file exists"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type NetworkPolicyController

type NetworkPolicyController struct {
	// contains filtered or unexported fields
}

NetworkPolicyController strcut to hold information required by NetworkPolicyController

func NewNetworkPolicyController

func NewNetworkPolicyController(clientset *kubernetes.Clientset, config *options.KubeRouterConfig) (*NetworkPolicyController, error)

NewNetworkPolicyController returns new NetworkPolicyController object

func (*NetworkPolicyController) Cleanup

func (npc *NetworkPolicyController) Cleanup()

Cleanup cleanup configurations done

func (*NetworkPolicyController) OnNamespaceUpdate

func (npc *NetworkPolicyController) OnNamespaceUpdate(namespaceUpdate *watchers.NamespaceUpdate)

OnNamespaceUpdate handles updates to namespace from kubernetes api server

func (*NetworkPolicyController) OnNetworkPolicyUpdate

func (npc *NetworkPolicyController) OnNetworkPolicyUpdate(networkPolicyUpdate *watchers.NetworkPolicyUpdate)

OnNetworkPolicyUpdate handles updates to network policy from the kubernetes api server

func (*NetworkPolicyController) OnPodUpdate

func (npc *NetworkPolicyController) OnPodUpdate(podUpdate *watchers.PodUpdate)

OnPodUpdate handles updates to pods from the Kubernetes api server

func (*NetworkPolicyController) Run

func (npc *NetworkPolicyController) Run(stopCh <-chan struct{}, wg *sync.WaitGroup)

Run runs forver till we receive notification on stopCh

func (*NetworkPolicyController) Sync

func (npc *NetworkPolicyController) Sync() error

Sync synchronizes iptables to desired state of network policies

type NetworkRoutingController

type NetworkRoutingController struct {
	// contains filtered or unexported fields
}

NetworkRoutingController is struct to hold necessary information required by controller

func NewNetworkRoutingController

func NewNetworkRoutingController(clientset *kubernetes.Clientset,
	kubeRouterConfig *options.KubeRouterConfig) (*NetworkRoutingController, error)

NewNetworkRoutingController returns new NetworkRoutingController object

func (*NetworkRoutingController) AdvertiseClusterIp added in v0.0.5

func (nrc *NetworkRoutingController) AdvertiseClusterIp(clusterIp string) error

AdvertiseClusterIp advertises the service cluster ip the configured peers

func (*NetworkRoutingController) Cleanup

func (nrc *NetworkRoutingController) Cleanup()

Cleanup performs the cleanup of configurations done

func (*NetworkRoutingController) OnNodeUpdate added in v0.0.5

func (nrc *NetworkRoutingController) OnNodeUpdate(nodeUpdate *watchers.NodeUpdate)

OnNodeUpdate Handle updates from Node watcher. Node watcher calls this method whenever there is new node is added or old node is deleted. So peer up with new node and drop peering from old node

func (*NetworkRoutingController) Run

func (nrc *NetworkRoutingController) Run(stopCh <-chan struct{}, wg *sync.WaitGroup)

Run runs forever until we are notified on stop channel

type NetworkServicesController

type NetworkServicesController struct {
	// contains filtered or unexported fields
}

NetworkServicesController struct stores information needed by the controller

func NewNetworkServicesController

func NewNetworkServicesController(clientset *kubernetes.Clientset, config *options.KubeRouterConfig) (*NetworkServicesController, error)

NewNetworkServicesController returns NetworkServicesController object

func (*NetworkServicesController) Cleanup

func (nsc *NetworkServicesController) Cleanup()

Cleanup cleans all the configurations (IPVS, iptables, links) done

func (*NetworkServicesController) OnEndpointsUpdate

func (nsc *NetworkServicesController) OnEndpointsUpdate(endpointsUpdate *watchers.EndpointsUpdate)

OnEndpointsUpdate handle change in endpoints update from the API server

func (*NetworkServicesController) OnServiceUpdate

func (nsc *NetworkServicesController) OnServiceUpdate(serviceUpdate *watchers.ServiceUpdate)

OnServiceUpdate handle change in service update from the API server

func (*NetworkServicesController) Run

func (nsc *NetworkServicesController) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) error

Run periodically sync ipvs configuration to reflect desired state of services and endpoints

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL