Beispiel #1
0
func RunSDNController(config *kubernetes.NodeConfig, nodeConfig configapi.NodeConfig) {
	if nodeConfig.NetworkPluginName != osdn.NetworkPluginName() {
		return
	}

	oclient, _, err := configapi.GetOpenShiftClient(nodeConfig.MasterKubeConfig)
	if err != nil {
		glog.Fatal("Failed to get kube client for SDN")
	}
	ch := make(chan struct{})
	config.KubeletConfig.StartUpdates = ch
	go osdn.Node(oclient, config.Client, nodeConfig.NodeName, "", ch)
}
Beispiel #2
0
// RunSDNController runs openshift-sdn if the said network plugin is provided
func (c *MasterConfig) RunSDNController() {
	osclient, kclient := c.SDNControllerClients()
	if c.Options.NetworkConfig.NetworkPluginName == osdn.NetworkPluginName() {
		osdn.Master(osclient, kclient, c.Options.NetworkConfig.ClusterNetworkCIDR, c.Options.NetworkConfig.HostSubnetLength)
	}
}