api

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Scheme = runtime.NewScheme()

Functions

func GetAPIClientCertCAPool

func GetAPIClientCertCAPool(options MasterConfig) (*x509.CertPool, error)

GetAPIClientCertCAPool returns the cert pool used to validate client certificates to the API server

func GetAPIServerCertCAPool

func GetAPIServerCertCAPool(options MasterConfig) (*x509.CertPool, error)

GetAPIServerCertCAPool returns the cert pool containing the roots for the API server cert

func GetClientCertCAPool

func GetClientCertCAPool(options MasterConfig) (*x509.CertPool, error)

GetClientCertCAPool returns a cert pool containing all client CAs that could be presented (union of API and OAuth)

func GetKubeClient

func GetKubeClient(kubeConfigFile string) (*kclient.Client, *kclient.Config, error)

func GetMasterFileReferences

func GetMasterFileReferences(config *MasterConfig) []*string

func GetNodeFileReferences

func GetNodeFileReferences(config *NodeConfig) []*string

func GetOpenShiftClient

func GetOpenShiftClient(kubeConfigFile string) (*client.Client, *kclient.Config, error)

func RelativizeMasterConfigPaths

func RelativizeMasterConfigPaths(config *MasterConfig, base string) error

func RelativizeNodeConfigPaths

func RelativizeNodeConfigPaths(config *NodeConfig, base string) error

func ResolveMasterConfigPaths

func ResolveMasterConfigPaths(config *MasterConfig, base string) error

func ResolveNodeConfigPaths

func ResolveNodeConfigPaths(config *NodeConfig, base string) error

func UseTLS

func UseTLS(servingInfo ServingInfo) bool

Types

type AssetConfig

type AssetConfig struct {
	ServingInfo ServingInfo

	// PublicURL is where you can find the asset server (TODO do we really need this?)
	PublicURL string

	// LogoutURI is an optional, absolute URI to redirect web browsers to after logging out of the web console.
	// If not specified, the built-in logout page is shown.
	LogoutURI string

	// MasterPublicURL is how the web console can access the OpenShift api server
	MasterPublicURL string

	// TODO: we probably don't need this since we have a proxy
	// KubernetesPublicURL is how the web console can access the Kubernetes api server
	KubernetesPublicURL string
}

type CertInfo

type CertInfo struct {
	// CertFile is a file containing a PEM-encoded certificate
	CertFile string
	// KeyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile
	KeyFile string
}

type DNSConfig

type DNSConfig struct {
	// BindAddress is the ip:port to serve DNS on
	BindAddress string
}

type EtcdConfig

type EtcdConfig struct {
	ServingInfo ServingInfo

	PeerAddress   string
	MasterAddress string
	// StorageDir indicates where to save the etcd data
	StorageDir string
}

type ImageConfig

type ImageConfig struct {
	// Format describes how to determine image names for system components
	Format string
	// Latest indicates whether to attempt to use the latest system component images as opposed to latest release
	Latest bool
}

type KubernetesMasterConfig

type KubernetesMasterConfig struct {
	// MasterIP is the public IP address of kubernetes stuff.  If empty, the first result from net.InterfaceAddrs will be used.
	MasterIP string
	// ServicesSubnet is the subnet to use for assigning service IPs
	ServicesSubnet string
	// StaticNodeNames is the list of nodes that are statically known
	StaticNodeNames []string
	// SchedulerConfigFile points to a file that describes how to set up the scheduler.  If empty, you get the default scheduling rules.
	SchedulerConfigFile string
}

type MasterClients

type MasterClients struct {
	// DeployerKubeConfig is a .kubeconfig filename for depoyment pods to use
	DeployerKubeConfig string
	// OpenShiftLoopbackKubeConfig is a .kubeconfig filename for system components to loopback to this master
	OpenShiftLoopbackKubeConfig string
	// KubernetesKubeConfig is a .kubeconfig filename for system components to communicate to kubernetes for building the proxy
	KubernetesKubeConfig string
}

type MasterConfig

type MasterConfig struct {
	api.TypeMeta

	// ServingInfo describes how to start serving
	ServingInfo ServingInfo

	// CORSAllowedOrigins
	CORSAllowedOrigins []string

	// EtcdClientInfo contains information about how to connect to etcd
	EtcdClientInfo RemoteConnectionInfo

	// KubernetesMasterConfig, if present start the kubernetes master in this process
	KubernetesMasterConfig *KubernetesMasterConfig
	// EtcdConfig, if present start etcd in this process
	EtcdConfig *EtcdConfig
	// OAuthConfig, if present start the /oauth endpoint in this process
	OAuthConfig *OAuthConfig
	// AssetConfig, if present start the asset serverin this process
	AssetConfig *AssetConfig
	// DNSConfig, if present start the DNS server in this process
	DNSConfig *DNSConfig

	// MasterClients holds all the client connection information for controllers and other system components
	MasterClients MasterClients

	// ImageConfig holds options that describe how to build image names for system components
	ImageConfig ImageConfig

	// PolicyConfig holds information about where to locate critical pieces of bootstrapping policy
	PolicyConfig PolicyConfig
}

func (*MasterConfig) IsAnAPIObject

func (*MasterConfig) IsAnAPIObject()

type NodeConfig

type NodeConfig struct {
	api.TypeMeta

	// NodeName is the value used to identify this particular node in the cluster.  If possible, this should be your fully qualified hostname.
	// If you're describing a set of static nodes to the master, this value must match one of the values in the list
	NodeName string

	// ServingInfo describes how to start serving
	ServingInfo ServingInfo

	// MasterKubeConfig is a filename for the .kubeconfig file that describes how to connect this node to the master
	MasterKubeConfig string

	// domain suffix
	DNSDomain string
	// ip
	DNSIP string

	// VolumeDir is the directory that volumes will be stored under
	VolumeDirectory string

	// NetworkContainerImage is the image used as the Kubelet network namespace and volume container.
	NetworkContainerImage string

	// AllowDisabledDocker if true, the Kubelet will ignore errors from Docker.  This means that a node can start on a machine that doesn't have docker started.
	AllowDisabledDocker bool

	// RecordEvents indicates whether or not to record events from the master
	RecordEvents bool
}

NodeConfig is the fully specified config starting an OpenShift node

func (*NodeConfig) IsAnAPIObject

func (*NodeConfig) IsAnAPIObject()

type OAuthConfig

type OAuthConfig struct {
	// ProxyCA is the certificate bundle for confirming the identity of front proxy forwards to the oauth server
	ProxyCA string

	// MasterURL is used for building valid client redirect URLs for external access
	MasterURL string

	// MasterPublicURL is used for building valid client redirect URLs for external access
	MasterPublicURL string

	// AssetPublicURL is used for building valid client redirect URLs for external access
	AssetPublicURL string
}

type PolicyConfig

type PolicyConfig struct {
	// BootstrapPolicyFile points to a template that contains roles and rolebindings that will be created if no policy object exists in the master namespace
	BootstrapPolicyFile string

	// MasterAuthorizationNamespace is the global namespace for Policy
	MasterAuthorizationNamespace string
	// OpenShiftSharedResourcesNamespace is the namespace where shared OpenShift resources live (like shared templates)
	OpenShiftSharedResourcesNamespace string
}

type RemoteConnectionInfo

type RemoteConnectionInfo struct {
	// URL is the URL for etcd
	URL string
	// CA is the CA for confirming that the server at the etcdURL is the actual server
	CA string
	// EtcdClientCertInfo is the TLS client cert information for securing communication to  etcd
	// this is anonymous so that we can inline it for serialization
	ClientCert CertInfo
}

type ServingInfo

type ServingInfo struct {
	// BindAddress is the ip:port to serve on
	BindAddress string
	// ServerCert is the TLS cert info for serving secure traffic
	ServerCert CertInfo
	// ClientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates
	ClientCA string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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