Documentation ¶
Overview ¶
Package kubernetes provides objects for starting the Kubernetes master and node code.
Index ¶
- Constants
- type MasterConfig
- func (c *MasterConfig) EnsurePortalFlags()
- func (c *MasterConfig) InstallAPI(container *restful.Container) []string
- func (c *MasterConfig) RunEndpointController()
- func (c *MasterConfig) RunMinionController()
- func (c *MasterConfig) RunNamespaceController()
- func (c *MasterConfig) RunReplicationController()
- func (c *MasterConfig) RunResourceQuotaManager()
- func (c *MasterConfig) RunScheduler()
- type NodeConfig
- type ProxyConfig
Constants ¶
const ( KubeAPIPrefix = "/api" KubeAPIPrefixV1Beta1 = "/api/v1beta1" KubeAPIPrefixV1Beta2 = "/api/v1beta2" KubeAPIPrefixV1Beta3 = "/api/v1beta3" KubeAPIPrefixV1 = "/api/v1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MasterConfig ¶
type MasterConfig struct { MasterIP net.IP MasterPort int NodeHosts []string PortalNet *net.IPNet RequestContextMapper kapi.RequestContextMapper EtcdHelper tools.EtcdHelper KubeClient *kclient.Client KubeletClientConfig *kclient.KubeletConfig Authorizer authorizer.Authorizer AdmissionControl admission.Interface SchedulerConfigFile string }
MasterConfig defines the required values to start a Kubernetes master
func BuildKubernetesMasterConfig ¶ added in v0.4.2
func BuildKubernetesMasterConfig(options configapi.MasterConfig, requestContextMapper kapi.RequestContextMapper, kubeClient *kclient.Client) (*MasterConfig, error)
func (*MasterConfig) EnsurePortalFlags ¶
func (c *MasterConfig) EnsurePortalFlags()
TODO: Longer term we should read this from some config store, rather than a flag.
func (*MasterConfig) InstallAPI ¶
func (c *MasterConfig) InstallAPI(container *restful.Container) []string
InstallAPI starts a Kubernetes master and registers the supported REST APIs into the provided mux, then returns an array of strings indicating what endpoints were started (these are format strings that will expect to be sent a single string value).
func (*MasterConfig) RunEndpointController ¶
func (c *MasterConfig) RunEndpointController()
RunEndpointController starts the Kubernetes replication controller sync loop
func (*MasterConfig) RunMinionController ¶
func (c *MasterConfig) RunMinionController()
func (*MasterConfig) RunNamespaceController ¶ added in v0.4.3
func (c *MasterConfig) RunNamespaceController()
func (*MasterConfig) RunReplicationController ¶
func (c *MasterConfig) RunReplicationController()
RunReplicationController starts the Kubernetes replication controller sync loop
func (*MasterConfig) RunResourceQuotaManager ¶ added in v0.3.2
func (c *MasterConfig) RunResourceQuotaManager()
func (*MasterConfig) RunScheduler ¶
func (c *MasterConfig) RunScheduler()
RunScheduler starts the Kubernetes scheduler
type NodeConfig ¶
type NodeConfig struct { // The address to bind to BindAddress string // The name of this node that will be used to identify the node in the master. // This value must match the value provided to the master on startup. NodeHost string // The host that the master can be reached at (not in use yet) MasterHost string // The directory that volumes will be stored under VolumeDir string ClusterDomain string ClusterDNS net.IP // a function that returns the appropriate image to use for a named component ImageFor func(component string) string // The name of the network plugin to activate NetworkPluginName string // If true, the Kubelet will ignore errors from Docker AllowDisabledDocker bool // Whether to enable TLS serving TLS bool // Enable TLS serving KubeletCertFile string KubeletKeyFile string // ClientCAs will be used to request client certificates in connections to the node. // This CertPool should contain all the CAs that will be used for client certificate verification. ClientCAs *x509.CertPool // A client to connect to the master. Client *client.Client // A client to connect to Docker DockerClient dockertools.DockerInterface // PodManifestPath specifies the path for the pod manifest file(s) // The path could point to a single file or a directory that contains multiple manifest files // This is used by the Kubelet to create pods on the node PodManifestPath string // PodManifestCheckIntervalSeconds is the interval in seconds for checking the manifest file(s) for new data // The interval needs to be a positive value PodManifestCheckIntervalSeconds int64 }
NodeConfig represents the required parameters to start the OpenShift node through Kubernetes. All fields are required.
func BuildKubernetesNodeConfig ¶ added in v0.4.2
func BuildKubernetesNodeConfig(options configapi.NodeConfig) (*NodeConfig, error)
func (*NodeConfig) EnsureDocker ¶
func (c *NodeConfig) EnsureDocker(docker *dockerutil.Helper)
EnsureDocker attempts to connect to the Docker daemon defined by the helper, and if it is unable to it will print a warning.
func (*NodeConfig) EnsureVolumeDir ¶
func (c *NodeConfig) EnsureVolumeDir()
EnsureVolumeDir attempts to convert the provided volume directory argument to an absolute path and create the directory if it does not exist. Will exit if an error is encountered.
func (*NodeConfig) HandleDockerError ¶ added in v0.5.1
func (c *NodeConfig) HandleDockerError(message string)
type ProxyConfig ¶ added in v0.2.2
func (*ProxyConfig) InstallAPI ¶ added in v0.2.2
func (c *ProxyConfig) InstallAPI(container *restful.Container) []string