Documentation ¶
Index ¶
- Constants
- func CreateManagementPort(nodeName, localSubnet, clusterServicesSubnet string, clusterSubnet []string) error
- type Controller
- func (ovn *Controller) AddEndpoints(ep *kapi.Endpoints) error
- func (oc *Controller) AddLogicalPortWithIP(pod *kapi.Pod)
- func (oc *Controller) AddNamespace(ns *kapi.Namespace)
- func (oc *Controller) AddNetworkPolicy(policy *knet.NetworkPolicy)
- func (oc *Controller) Run() error
- func (oc *Controller) WatchEndpoints() error
- func (oc *Controller) WatchNamespaces() error
- func (oc *Controller) WatchNetworkPolicy() error
- func (oc *Controller) WatchNodes() error
- func (oc *Controller) WatchPods() error
- func (oc *Controller) WatchServices() error
Constants ¶
const ( // TCP is the constant string for the string "TCP" TCP = "TCP" // UDP is the constant string for the string "UDP" UDP = "UDP" )
Variables ¶
This section is empty.
Functions ¶
func CreateManagementPort ¶
func CreateManagementPort(nodeName, localSubnet, clusterServicesSubnet string, clusterSubnet []string) error
CreateManagementPort creates a management port attached to the node switch that lets the node access its pods via their private IP address. This is used for health checking and other management tasks.
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller structure is the object which holds the controls for starting and reacting upon the watched resources (e.g. pods, endpoints)
func NewOvnController ¶
func NewOvnController(kubeClient kubernetes.Interface, wf *factory.WatchFactory, nodePortEnable bool) *Controller
NewOvnController creates a new OVN controller for creating logical network infrastructure and policy
func (*Controller) AddEndpoints ¶
func (ovn *Controller) AddEndpoints(ep *kapi.Endpoints) error
AddEndpoints adds endpoints and creates corresponding resources in OVN
func (*Controller) AddLogicalPortWithIP ¶
func (oc *Controller) AddLogicalPortWithIP(pod *kapi.Pod)
AddLogicalPortWithIP add logical port with static ip address and mac adddress for the pod
func (*Controller) AddNamespace ¶
func (oc *Controller) AddNamespace(ns *kapi.Namespace)
AddNamespace creates corresponding addressset in ovn db
func (*Controller) AddNetworkPolicy ¶
func (oc *Controller) AddNetworkPolicy(policy *knet.NetworkPolicy)
AddNetworkPolicy adds network policy and create corresponding acl rules
func (*Controller) Run ¶
func (oc *Controller) Run() error
Run starts the actual watching. Also initializes any local structures needed.
func (*Controller) WatchEndpoints ¶
func (oc *Controller) WatchEndpoints() error
WatchEndpoints starts the watching of Endpoint resource and calls back the appropriate handler logic
func (*Controller) WatchNamespaces ¶
func (oc *Controller) WatchNamespaces() error
WatchNamespaces starts the watching of namespace resource and calls back the appropriate handler logic
func (*Controller) WatchNetworkPolicy ¶
func (oc *Controller) WatchNetworkPolicy() error
WatchNetworkPolicy starts the watching of network policy resource and calls back the appropriate handler logic
func (*Controller) WatchNodes ¶
func (oc *Controller) WatchNodes() error
WatchNodes starts the watching of node resource and calls back the appropriate handler logic
func (*Controller) WatchPods ¶
func (oc *Controller) WatchPods() error
WatchPods starts the watching of Pod resource and calls back the appropriate handler logic
func (*Controller) WatchServices ¶
func (oc *Controller) WatchServices() error
WatchServices starts the watching of Service resource and calls back the appropriate handler logic