server

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Overview

Package server contains the main command for launching an OpenShift server. Subpackages contain the specific components that the server may need.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v0.3.3

type Config struct {
	Docker *docker.Helper

	WriteConfigOnly bool

	StartNode   bool
	StartMaster bool
	StartKube   bool
	StartEtcd   bool

	MasterAddr     flagtypes.Addr
	BindAddr       flagtypes.Addr
	EtcdAddr       flagtypes.Addr
	KubernetesAddr flagtypes.Addr
	PortalNet      flagtypes.IPNet
	// addresses for external clients
	MasterPublicAddr     flagtypes.Addr
	KubernetesPublicAddr flagtypes.Addr

	ImageFormat         string
	LatestReleaseImages bool

	ImageTemplate variable.ImageTemplate

	Hostname  string
	VolumeDir string

	EtcdDir string

	CertDir string

	StorageVersion string

	NodeList flagtypes.StringList

	// 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

	CORSAllowedOrigins flagtypes.StringList
}

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

func NewCommandStartServer

func NewCommandStartServer(name string) (*cobra.Command, *Config)

NewCommandStartServer provides a CLI handler for 'start' command

func NewDefaultConfig added in v0.3.3

func NewDefaultConfig() *Config

func (Config) BuildAuthConfig added in v0.3.3

func (cfg Config) BuildAuthConfig() (*origin.AuthConfig, error)

func (Config) BuildKubernetesMasterConfig added in v0.3.3

func (cfg Config) BuildKubernetesMasterConfig(requestContextMapper kapi.RequestContextMapper, kubeClient *kclient.Client) (*kubernetes.MasterConfig, error)

func (Config) BuildKubernetesNodeConfig added in v0.3.3

func (cfg Config) BuildKubernetesNodeConfig() (*kubernetes.NodeConfig, error)

func (Config) BuildOriginMasterConfig added in v0.3.3

func (cfg Config) BuildOriginMasterConfig() (*origin.MasterConfig, error)

func (*Config) Complete added in v0.3.3

func (cfg *Config) Complete(args []string)

Complete takes the args and fills in information for the start config

func (Config) GetAssetBindAddress added in v0.3.3

func (cfg Config) GetAssetBindAddress() string

func (Config) GetAssetCert added in v0.3.3

func (cfg Config) GetAssetCert() (certFile string, keyFile string, err error)

func (Config) GetAssetPublicAddress added in v0.3.3

func (cfg Config) GetAssetPublicAddress() (*url.URL, error)

func (Config) GetClientCAs added in v0.3.3

func (cfg Config) GetClientCAs() (*x509.CertPool, error)

func (Config) GetEtcdAddress added in v0.3.3

func (cfg Config) GetEtcdAddress() (*url.URL, error)

func (Config) GetEtcdBindAddress added in v0.3.3

func (cfg Config) GetEtcdBindAddress() string

func (Config) GetEtcdPeerBindAddress added in v0.3.3

func (cfg Config) GetEtcdPeerBindAddress() string

func (Config) GetExternalKubernetesClientConfig added in v0.3.3

func (cfg Config) GetExternalKubernetesClientConfig() (*client.Config, bool, error)

func (Config) GetKubeClient added in v0.3.3

func (cfg Config) GetKubeClient() (*kclient.Client, *kclient.Config, error)

func (Config) GetKubernetesAddress added in v0.3.3

func (cfg Config) GetKubernetesAddress() (*url.URL, error)

func (Config) GetKubernetesPublicAddress added in v0.3.3

func (cfg Config) GetKubernetesPublicAddress() (*url.URL, error)

func (Config) GetMasterAddress added in v0.3.3

func (cfg Config) 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 (Config) GetMasterCert added in v0.3.3

func (cfg Config) GetMasterCert() (certFile string, keyFile string, err error)

func (Config) GetMasterPublicAddress added in v0.3.3

func (cfg Config) GetMasterPublicAddress() (*url.URL, error)

func (Config) GetNodeList added in v0.3.3

func (cfg Config) GetNodeList() []string

func (Config) GetOpenshiftClient added in v0.3.3

func (cfg Config) GetOpenshiftClient() (*osclient.Client, *kclient.Config, error)

func (Config) GetOpenshiftDeployerClientConfig added in v0.3.3

func (cfg Config) GetOpenshiftDeployerClientConfig() (*kclient.Config, error)

func (Config) GetServerCertHostnames added in v0.3.3

func (cfg Config) GetServerCertHostnames() ([]string, error)

func (Config) MintNodeCerts added in v0.3.3

func (cfg Config) MintNodeCerts() error

func (Config) MintSystemClientCert added in v0.3.3

func (cfg Config) MintSystemClientCert(username string, groups ...string) (*kclient.Config, error)

known certs: openshiftClientUser := &user.DefaultInfo{Name: "system:openshift-client"} openshiftDeployerUser := &user.DefaultInfo{Name: "system:openshift-deployer", Groups: []string{"system:deployers"}} adminUser := &user.DefaultInfo{Name: "system:admin", Groups: []string{"system:cluster-admins"}} kubeClientUser := &user.DefaultInfo{Name: "system:kube-client"} // One for each node in cfg.GetNodeList()

func (Config) RunEtcd added in v0.3.3

func (cfg Config) RunEtcd() error

func (Config) Start added in v0.3.3

func (cfg Config) Start(args []string) error

run launches the appropriate startup modes or returns an error.

func (Config) Validate added in v0.3.3

func (cfg Config) Validate(args []string) error

Directories

Path Synopsis
Package etcd provides objects for creating an embedded etcd server process.
Package etcd provides objects for creating an embedded etcd server process.
Package kubernetes provides objects for starting the Kubernetes master and node code.
Package kubernetes provides objects for starting the Kubernetes master and node code.
Package origin provides objects for creating an OpenShift Origin server
Package origin provides objects for creating an OpenShift Origin server

Jump to

Keyboard shortcuts

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