start

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: May 28, 2015 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindImageFormatArgs

func BindImageFormatArgs(args *ImageFormatArgs, flags *pflag.FlagSet, prefix string)

func BindKubeConnectionArgs

func BindKubeConnectionArgs(args *KubeConnectionArgs, flags *pflag.FlagSet, prefix string)

func BindListenArg

func BindListenArg(args *ListenArg, flags *pflag.FlagSet, prefix string)

func BindMasterArgs

func BindMasterArgs(args *MasterArgs, flags *pflag.FlagSet, prefix string)

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

func BindNetworkArgs added in v0.5.2

func BindNetworkArgs(args *NetworkArgs, flags *pflag.FlagSet, prefix string)

func BindNodeArgs

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

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

func GetAllInOneArgs

func GetAllInOneArgs() (*MasterArgs, *NodeArgs, *ListenArg, *ImageFormatArgs, *KubeConnectionArgs)

GetAllInOneArgs makes sure that the node and master args that should be shared, are shared

func RunSDNController added in v0.5.2

func RunSDNController(config configapi.NodeConfig)

func StartMaster

func StartMaster(openshiftMasterConfig *configapi.MasterConfig) error

func StartNode

func StartNode(config configapi.NodeConfig) error

Types

type AllInOneOptions

type AllInOneOptions struct {
	MasterArgs *MasterArgs
	NodeArgs   *NodeArgs

	CreateCerts      bool
	ConfigDir        util.StringFlag
	MasterConfigFile string
	NodeConfigFile   string

	Output cmdutil.Output
}

func NewCommandStartAllInOne

func NewCommandStartAllInOne(fullName string, out io.Writer) (*cobra.Command, *AllInOneOptions)

NewCommandStartMaster provides a CLI handler for 'start' command

func (*AllInOneOptions) Complete

func (o *AllInOneOptions) Complete() error

func (AllInOneOptions) IsRunFromConfig added in v0.5.1

func (o AllInOneOptions) IsRunFromConfig() bool

func (AllInOneOptions) IsWriteConfigOnly added in v0.5.1

func (o AllInOneOptions) IsWriteConfigOnly() bool

func (AllInOneOptions) StartAllInOne

func (o AllInOneOptions) StartAllInOne() error

StartAllInOne: 1. Creates the signer certificate if needed 2. Calls RunMaster 3. Calls RunNode 4. If only writing configs, it exits 5. Waits forever

func (AllInOneOptions) Validate

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

type ImageFormatArgs

type ImageFormatArgs struct {
	ImageTemplate variable.ImageTemplate
}

OriginMasterArgs is a struct that the command stores flag values into.

func NewDefaultImageFormatArgs

func NewDefaultImageFormatArgs() *ImageFormatArgs

type KubeConnectionArgs

type KubeConnectionArgs struct {
	KubernetesAddr flagtypes.Addr

	// ClientConfig is used when connecting to Kubernetes from the master, or
	// when connecting to the master from a detached node. If StartKube is true,
	// this value is not used.
	ClientConfig clientcmd.ClientConfig
	// ClientConfigLoadingRules is the ruleset used to load the client config.
	// Only the CommandLinePath is expected to be used.
	ClientConfigLoadingRules clientcmd.ClientConfigLoadingRules
}

func NewDefaultKubeConnectionArgs

func NewDefaultKubeConnectionArgs() *KubeConnectionArgs

func (KubeConnectionArgs) GetExternalKubernetesClientConfig

func (args KubeConnectionArgs) GetExternalKubernetesClientConfig() (*client.Config, bool, error)

func (KubeConnectionArgs) GetKubernetesAddress

func (args KubeConnectionArgs) GetKubernetesAddress(defaultAddress *url.URL) (*url.URL, error)

func (KubeConnectionArgs) Validate added in v0.4.3

func (args KubeConnectionArgs) Validate() error

type ListenArg

type ListenArg struct {
	ListenAddr flagtypes.Addr
}

ListenArg is a struct that the command stores flag values into.

func NewDefaultListenArg

func NewDefaultListenArg() *ListenArg

func (*ListenArg) UseTLS

func (l *ListenArg) UseTLS() bool

type MasterArgs

type MasterArgs struct {
	MasterAddr flagtypes.Addr
	EtcdAddr   flagtypes.Addr
	PortalNet  flagtypes.IPNet
	// addresses for external clients
	MasterPublicAddr flagtypes.Addr

	// DNSBindAddr exposed for integration tests to set
	DNSBindAddr flagtypes.Addr

	EtcdDir   string
	ConfigDir *util.StringFlag

	NodeList util.StringList

	CORSAllowedOrigins util.StringList

	ListenArg          *ListenArg
	ImageFormatArgs    *ImageFormatArgs
	KubeConnectionArgs *KubeConnectionArgs

	SchedulerConfigFile string

	NetworkArgs *NetworkArgs
}

MasterArgs is a struct that the command stores flag values into. It holds a partially complete set of parameters for starting the master 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 NewDefaultMasterArgs

func NewDefaultMasterArgs() *MasterArgs

NewDefaultMasterArgs creates MasterArgs with sub-objects created and default values set.

func (MasterArgs) BuildSerializeableEtcdConfig

func (args MasterArgs) BuildSerializeableEtcdConfig() (*configapi.EtcdConfig, error)

BuildSerializeableEtcdConfig creates a fully specified etcd startup configuration based on MasterArgs

func (MasterArgs) BuildSerializeableKubeMasterConfig

func (args MasterArgs) BuildSerializeableKubeMasterConfig() (*configapi.KubernetesMasterConfig, error)

BuildSerializeableKubeMasterConfig creates a fully specified kubernetes master startup configuration based on MasterArgs

func (MasterArgs) BuildSerializeableMasterConfig

func (args MasterArgs) BuildSerializeableMasterConfig() (*configapi.MasterConfig, error)

BuildSerializeableMasterConfig takes the MasterArgs (partially complete config) and uses them along with defaulting behavior to create the fully specified config object for starting the master

func (MasterArgs) BuildSerializeableOAuthConfig added in v0.4.3

func (args MasterArgs) BuildSerializeableOAuthConfig() (*configapi.OAuthConfig, error)

func (MasterArgs) GetAssetBindAddress

func (args MasterArgs) GetAssetBindAddress() string

func (MasterArgs) GetAssetPublicAddress

func (args MasterArgs) GetAssetPublicAddress() (*url.URL, error)

func (MasterArgs) GetConfigFileToWrite added in v0.5.1

func (args MasterArgs) GetConfigFileToWrite() string

func (MasterArgs) GetDNSBindAddress

func (args MasterArgs) GetDNSBindAddress() (flagtypes.Addr, error)

func (MasterArgs) GetEtcdAddress

func (args MasterArgs) GetEtcdAddress() (*url.URL, error)

func (MasterArgs) GetEtcdBindAddress

func (args MasterArgs) GetEtcdBindAddress() string

func (MasterArgs) GetEtcdPeerAddress added in v0.4.3

func (args MasterArgs) GetEtcdPeerAddress() (*url.URL, error)

func (MasterArgs) GetEtcdPeerBindAddress

func (args MasterArgs) GetEtcdPeerBindAddress() string

func (MasterArgs) GetMasterAddress

func (args MasterArgs) GetMasterAddress() (*url.URL, error)

GetMasterAddress checks for an unset master address and then attempts to use the first public IPv4 non-loopback address registered on this host. TODO: make me IPv6 safe

func (MasterArgs) GetMasterPublicAddress

func (args MasterArgs) GetMasterPublicAddress() (*url.URL, error)

func (MasterArgs) GetPolicyFile added in v0.5.1

func (args MasterArgs) GetPolicyFile() string

func (MasterArgs) GetServerCertHostnames

func (args MasterArgs) GetServerCertHostnames() (util.StringSet, error)

GetServerCertHostnames returns the set of hostnames that any serving certificate for master needs to be valid for.

func (MasterArgs) Validate

func (args MasterArgs) Validate() error

type MasterOptions

type MasterOptions struct {
	MasterArgs *MasterArgs

	CreateCertificates bool
	ConfigFile         string
	Output             cmdutil.Output
}

func NewCommandStartMaster

func NewCommandStartMaster(out io.Writer) (*cobra.Command, *MasterOptions)

NewCommandStartMaster provides a CLI handler for 'start' command

func (*MasterOptions) Complete

func (o *MasterOptions) Complete() error

func (MasterOptions) CreateBootstrapPolicy

func (o MasterOptions) CreateBootstrapPolicy() error

func (MasterOptions) CreateCerts

func (o MasterOptions) CreateCerts() error

func (MasterOptions) IsRunFromConfig added in v0.5.1

func (o MasterOptions) IsRunFromConfig() bool

func (MasterOptions) IsWriteConfigOnly added in v0.5.1

func (o MasterOptions) IsWriteConfigOnly() bool

func (MasterOptions) RunMaster

func (o MasterOptions) RunMaster() error

RunMaster takes the options and: 1. Creates certs if needed 2. Reads fully specified master config OR builds a fully specified master config from the args 3. Writes the fully specified master config and exits if needed 4. Starts the master based on the fully specified config

func (MasterOptions) StartMaster

func (o MasterOptions) StartMaster() error

StartMaster calls RunMaster and then waits forever

func (MasterOptions) Validate

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

type NetworkArgs added in v0.5.2

type NetworkArgs struct {
	NetworkPluginName  string
	ClusterNetworkCIDR string
	HostSubnetLength   uint
}

NetworkArgs is a struct that the command stores flag values into.

func NewDefaultNetworkArgs added in v0.5.2

func NewDefaultNetworkArgs() *NetworkArgs

type NodeArgs

type NodeArgs struct {
	NodeName string

	MasterCertDir string
	ConfigDir     util.StringFlag

	AllowDisabledDocker bool
	VolumeDir           string

	DefaultKubernetesURL *url.URL
	ClusterDomain        string
	ClusterDNS           net.IP

	NetworkPluginName string

	ListenArg          *ListenArg
	ImageFormatArgs    *ImageFormatArgs
	KubeConnectionArgs *KubeConnectionArgs
}

NodeArgs is a struct that the command stores flag values into. It holds a partially complete set of parameters for starting the master 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 NewDefaultNodeArgs

func NewDefaultNodeArgs() *NodeArgs

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

func (NodeArgs) BuildSerializeableNodeConfig

func (args NodeArgs) BuildSerializeableNodeConfig() (*configapi.NodeConfig, error)

BuildSerializeableNodeConfig takes the NodeArgs (partially complete config) and uses them along with defaulting behavior to create the fully specified config object for starting the node

func (NodeArgs) Validate added in v0.4.3

func (args NodeArgs) Validate() error

type NodeOptions

type NodeOptions struct {
	NodeArgs *NodeArgs

	ConfigFile string
	Output     cmdutil.Output
}

func NewCommandStartNode

func NewCommandStartNode(out io.Writer) (*cobra.Command, *NodeOptions)

NewCommandStartMaster provides a CLI handler for 'start' command

func (NodeOptions) Complete

func (o NodeOptions) Complete() error

func (NodeOptions) CreateNodeConfig added in v0.5.1

func (o NodeOptions) CreateNodeConfig() error

func (NodeOptions) IsRunFromConfig added in v0.5.1

func (o NodeOptions) IsRunFromConfig() bool

func (NodeOptions) IsWriteConfigOnly added in v0.5.1

func (o NodeOptions) IsWriteConfigOnly() bool

func (NodeOptions) RunNode

func (o NodeOptions) RunNode() error

RunNode takes the options and: 1. Creates certs if needed 2. Reads fully specified node config OR builds a fully specified node config from the args 3. Writes the fully specified node config and exits if needed 4. Starts the node based on the fully specified config

func (NodeOptions) StartNode

func (o NodeOptions) StartNode() error

StartNode calls RunNode and then waits forever

func (NodeOptions) Validate

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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