Documentation ¶
Index ¶
Constants ¶
const (
// OvnHostSubnet is the constant string representing the annotation key
OvnHostSubnet = "ovn_host_subnet"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OvnClusterController ¶
type OvnClusterController struct { Kube kube.Interface ClusterIPNet *net.IPNet ClusterServicesSubnet string HostSubnetLength uint32 GatewayInit bool GatewayIntf string GatewayBridge string GatewayNextHop string GatewaySpareIntf bool NodePortEnable bool // contains filtered or unexported fields }
OvnClusterController is the object holder for utilities meant for cluster management
func NewClusterController ¶ added in v0.2.0
func NewClusterController(kubeClient kubernetes.Interface, wf *factory.WatchFactory) *OvnClusterController
NewClusterController creates a new controller for IP subnet allocation to a given resource type (either Namespace or Node)
func (*OvnClusterController) SetupMaster ¶
func (cluster *OvnClusterController) SetupMaster(masterNodeName string, masterSwitchNetwork string) error
SetupMaster calls the external script to create the switch and central routers for the network
func (*OvnClusterController) StartClusterMaster ¶
func (cluster *OvnClusterController) StartClusterMaster(masterNodeName string) error
StartClusterMaster runs a subnet IPAM and a controller that watches arrival/departure of nodes in the cluster On an addition to the cluster (node create), a new subnet is created for it that will translate to creation of a logical switch (done by the node, but could be created here at the master process too) Upon deletion of a node, the switch will be deleted
TODO: Verify that the cluster was not already called with a different global subnet
If true, then either quit or perform a complete reconfiguration of the cluster (recreate switches/routers with new subnet values)
func (*OvnClusterController) StartClusterNode ¶
func (cluster *OvnClusterController) StartClusterNode(name string) error
StartClusterNode learns the subnet assigned to it by the master controller and calls the SetupNode script which establishes the logical switch