network

package
v4.0.0-0.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2018 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComponentProxy   = "proxy"
	ComponentDNS     = "dns"
	ComponentPlugins = "plugins"
	ComponentKubelet = "kubelet"
)

Variables

This section is empty.

Functions

func BindNodeNetworkArgs

func BindNodeNetworkArgs(args *NodeArgs, flags *pflag.FlagSet, prefix string)

BindNodeNetworkArgs binds the options to the flags with prefix + default flag names

func NewNetworkComponentFlag

func NewNetworkComponentFlag() *utilflags.ComponentFlag

NewNodeComponentFlag returns a flag capable of handling enabled components for the network

func StartNetwork

func StartNetwork(nodeConfig configapi.NodeConfig, components *utilflags.ComponentFlag, stopCh <-chan struct{}) error

StartNetwork launches the node networking processes.

func ValidateRuntime

func ValidateRuntime(config *configapi.NodeConfig, components *utilflags.ComponentFlag) error

Types

type NetworkOptions

type NetworkOptions struct {
	NodeArgs   *NodeArgs
	ExpireDays int

	ConfigFile string
	Output     io.Writer
}

func NewCommandStartNetwork

func NewCommandStartNetwork(basename string, out, errout io.Writer) (*cobra.Command, *NetworkOptions)

NewCommandStartNetwork provides a CLI handler for the 'openshift-sdn' command

func (NetworkOptions) Complete

func (o NetworkOptions) Complete(cmd *cobra.Command) error

func (*NetworkOptions) Run

func (options *NetworkOptions) Run(c *cobra.Command, errout io.Writer, args []string, stopCh <-chan struct{})

func (NetworkOptions) RunNetwork

func (o NetworkOptions) RunNetwork(stopCh <-chan struct{}) error

RunNetwork takes the network options and does the following: 1. Reads the fully specified node config. 2. Starts the node networking based on the fully specified config.

func (NetworkOptions) StartNetwork

func (o NetworkOptions) StartNetwork(stopCh <-chan struct{}) error

StartNetwork starts the networking processes and then waits until the stop channel receives a message or is closed.

func (NetworkOptions) Validate

func (o NetworkOptions) Validate(args []string) error

type NodeArgs

type NodeArgs struct {
	// Components is the set of enabled components.
	Components *utilflags.ComponentFlag

	// NodeName is the hostname to identify this node with the master.
	NodeName string

	MasterCertDir string
	ConfigDir     flag.StringFlag

	DefaultKubernetesURL *url.URL
	ClusterDomain        string
	ClusterDNS           net.IP
	// DNSBindAddr is provided for the all-in-one start only and is not exposed via a flag
	DNSBindAddr string
	// RecursiveResolvConf
	RecursiveResolvConf string

	// NetworkPluginName is the network plugin to be called for configuring networking for pods.
	NetworkPluginName string

	ListenArg          *options.ListenArg
	ImageFormatArgs    *options.ImageFormatArgs
	KubeConnectionArgs *options.KubeConnectionArgs
}

NodeArgs is a struct that the command stores flag values into. It holds a partially complete set of parameters for starting a node. This object should hold the common set values, but not attempt to handle all cases. The expected path is to use this object to create a fully specified config later on. If you need something not set here, then create a fully specified config file and pass that as argument to starting the master.

func NewDefaultNetworkArgs

func NewDefaultNetworkArgs() *NodeArgs

NewDefaultNetworkArgs creates NodeArgs with sub-objects created and default values set.

func (NodeArgs) MergeSerializeableNodeConfig

func (args NodeArgs) MergeSerializeableNodeConfig(config *configapi.NodeConfig) error

MergeSerializeableNodeConfig takes the NodeArgs (partially complete config) and overlays them onto an existing config. Only a subset of node args are allowed to override this config - those that may reasonably be specified as local overrides.

func (NodeArgs) Validate

func (args NodeArgs) Validate() error

Jump to

Keyboard shortcuts

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