Documentation ¶
Overview ¶
Package origin provides objects for creating an OpenShift Origin server
Index ¶
- Constants
- func BuildSessionAuth(secure bool, config *configapi.SessionConfig) (*session.Authenticator, error)
- func CreateOrUpdateDefaultOAuthClients(masterPublicAddr string, assetPublicAddresses []string, ...) error
- func NewEtcdStorage(client newetcdclient.Client, version unversioned.GroupVersion, prefix string) (oshelper storage.Interface, err error)
- func OpenShiftOAuthAuthorizeURL(masterAddr string) string
- func OpenShiftOAuthTokenRequestURL(masterAddr string) string
- func OpenShiftOAuthTokenURL(masterAddr string) string
- type APIInstallFunc
- type APIInstaller
- type AssetConfig
- type AuthConfig
- type MasterConfig
- func (c *MasterConfig) BuildConfigChangeControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) BuildConfigWebHookClient() *osclient.Client
- func (c *MasterConfig) BuildControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) BuildImageChangeTriggerControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) BuildLogClient() *kclient.Client
- func (c *MasterConfig) BuildPodControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DNSServerClient() *kclient.Client
- func (c *MasterConfig) DeployerPodControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DeploymentClient() *kclient.Client
- func (c *MasterConfig) DeploymentConfigChangeControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DeploymentConfigClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DeploymentConfigControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DeploymentConfigScaleClient() *kclient.Client
- func (c *MasterConfig) DeploymentControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DeploymentImageChangeTriggerControllerClient() *osclient.Client
- func (c *MasterConfig) DeploymentLogClient() *kclient.Client
- func (c *MasterConfig) GetRestStorage() map[string]rest.Storage
- func (c *MasterConfig) GetServiceAccountClients(name string) (*restclient.Config, *osclient.Client, *kclient.Client, error)
- func (c *MasterConfig) ImageChangeControllerClient() *osclient.Client
- func (c *MasterConfig) ImageImportControllerClient() *osclient.Client
- func (c *MasterConfig) ImageStreamImportSecretClient() *osclient.Client
- func (c *MasterConfig) ImageStreamSecretClient() *kclient.Client
- func (c *MasterConfig) InitializeObjects()
- func (c *MasterConfig) InstallProtectedAPI(container *restful.Container) ([]string, error)
- func (c *MasterConfig) InstallUnprotectedAPI(container *restful.Container) ([]string, error)
- func (c *MasterConfig) KubeClient() *kclient.Client
- func (c *MasterConfig) OriginNamespaceControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) PolicyClient() *osclient.Client
- func (c *MasterConfig) ResourceQuotaManagerClients() (*osclient.Client, *internalclientset.Clientset)
- func (c *MasterConfig) RouteAllocator() *routeallocationcontroller.RouteAllocationController
- func (c *MasterConfig) RouteAllocatorClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) Run(protected []APIInstaller, unprotected []APIInstaller)
- func (c *MasterConfig) RunAssetServer()
- func (c *MasterConfig) RunBuildConfigChangeController()
- func (c *MasterConfig) RunBuildController()
- func (c *MasterConfig) RunBuildImageChangeTriggerController()
- func (c *MasterConfig) RunBuildPodController()
- func (c *MasterConfig) RunDNSServer()
- func (c *MasterConfig) RunDeployerPodController()
- func (c *MasterConfig) RunDeploymentConfigChangeController()
- func (c *MasterConfig) RunDeploymentConfigController()
- func (c *MasterConfig) RunDeploymentController()
- func (c *MasterConfig) RunDeploymentImageChangeTriggerController()
- func (c *MasterConfig) RunGroupCache()
- func (c *MasterConfig) RunHealth()
- func (c *MasterConfig) RunImageImportController()
- func (c *MasterConfig) RunOriginNamespaceController()
- func (c *MasterConfig) RunPolicyCache()
- func (c *MasterConfig) RunProjectAuthorizationCache()
- func (c *MasterConfig) RunProjectCache()
- func (c *MasterConfig) RunResourceQuotaManager(cm *cmapp.CMServer)
- func (c *MasterConfig) RunSDNController()
- func (c *MasterConfig) RunSecurityAllocationController()
- func (c *MasterConfig) RunServiceAccountPullSecretsControllers()
- func (c *MasterConfig) RunServiceAccountTokensController()
- func (c *MasterConfig) RunServiceAccountsController()
- func (c *MasterConfig) SDNControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) SdnClient() *osclient.Client
- func (c *MasterConfig) SecurityAllocationControllerClient() *kclient.Client
- func (c *MasterConfig) ServiceAccountRoleBindingClient() *osclient.Client
- func (c *MasterConfig) WebConsoleEnabled() bool
Constants ¶
const ( OpenShiftOAuthAPIPrefix = "/oauth" OpenShiftApprovePrefix = "/oauth/approve" OpenShiftOAuthCallbackPrefix = "/oauth2callback" OpenShiftWebConsoleClientID = "openshift-web-console" OpenShiftBrowserClientID = "openshift-browser-client" OpenShiftCLIClientID = "openshift-challenging-client" )
const ( LegacyOpenShiftAPIPrefix = "/osapi" // TODO: make configurable OpenShiftAPIPrefix = "/oapi" // TODO: make configurable KubernetesAPIPrefix = "/api" // TODO: make configurable KubernetesAPIGroupPrefix = "/apis" // TODO: make configurable OpenShiftAPIV1Beta3 = "v1beta3" OpenShiftAPIV1 = "v1" OpenShiftAPIPrefixV1Beta3 = LegacyOpenShiftAPIPrefix + "/" + OpenShiftAPIV1Beta3 OpenShiftAPIPrefixV1 = OpenShiftAPIPrefix + "/" + OpenShiftAPIV1 )
Variables ¶
This section is empty.
Functions ¶
func BuildSessionAuth ¶
func BuildSessionAuth(secure bool, config *configapi.SessionConfig) (*session.Authenticator, error)
func CreateOrUpdateDefaultOAuthClients ¶
func CreateOrUpdateDefaultOAuthClients(masterPublicAddr string, assetPublicAddresses []string, clientRegistry clientregistry.Registry) error
func NewEtcdStorage ¶ added in v1.0.5
func NewEtcdStorage(client newetcdclient.Client, version unversioned.GroupVersion, prefix string) (oshelper storage.Interface, err error)
NewEtcdStorage returns a storage interface for the provided storage version.
func OpenShiftOAuthTokenURL ¶
Types ¶
type APIInstallFunc ¶
APIInstallFunc is a function for installing APIs
func (APIInstallFunc) InstallAPI ¶
func (fn APIInstallFunc) InstallAPI(container *restful.Container) ([]string, error)
InstallAPI implements APIInstaller
type APIInstaller ¶
type APIInstaller interface { // InstallAPI returns an array of strings describing what was installed InstallAPI(*restful.Container) ([]string, error) }
APIInstaller installs additional API components into this server
type AssetConfig ¶
type AssetConfig struct { Options oapi.AssetConfig LimitRequestOverrides *api.ClusterResourceOverrideConfig }
AssetConfig defines the required parameters for starting the OpenShift master
func NewAssetConfig ¶ added in v1.1.3
func NewAssetConfig(options oapi.AssetConfig, limitRequestOverrides *api.ClusterResourceOverrideConfig) (*AssetConfig, error)
NewAssetConfig returns a new AssetConfig
func (*AssetConfig) InstallAPI ¶
func (c *AssetConfig) InstallAPI(container *restful.Container) ([]string, error)
InstallAPI adds handlers for serving static assets 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 (*AssetConfig) Run ¶
func (c *AssetConfig) Run()
Run starts an http server for the static assets listening on the configured bind address
type AuthConfig ¶
type AuthConfig struct { Options configapi.OAuthConfig // AssetPublicAddresses contains valid redirectURI prefixes to direct browsers to the web console AssetPublicAddresses []string // EtcdHelper provides storage capabilities EtcdHelper storage.Interface // EtcdBackends is a list of storage interfaces, each of which talks to a single etcd backend. // These are only used to ensure newly created tokens are distributed to all backends before returning them for use. // EtcdHelper should normally be used for storage functions. EtcdBackends []storage.Interface UserRegistry userregistry.Registry IdentityRegistry identityregistry.Registry SessionAuth *session.Authenticator }
func BuildAuthConfig ¶
func BuildAuthConfig(options configapi.MasterConfig) (*AuthConfig, error)
func (*AuthConfig) InstallAPI ¶
func (c *AuthConfig) InstallAPI(container *restful.Container) ([]string, error)
InstallAPI registers endpoints for an OAuth2 server 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 (*AuthConfig) NewOpenShiftOAuthClientConfig ¶
func (c *AuthConfig) NewOpenShiftOAuthClientConfig(client *oauthapi.OAuthClient) *osincli.ClientConfig
NewOpenShiftOAuthClientConfig provides config for OpenShift OAuth client
type MasterConfig ¶
type MasterConfig struct { Options configapi.MasterConfig Authenticator authenticator.Request Authorizer authorizer.Authorizer AuthorizationAttributeBuilder authorizer.AuthorizationAttributeBuilder PolicyCache policycache.ReadOnlyCache GroupCache *usercache.GroupCache ProjectAuthorizationCache *projectauth.AuthorizationCache ProjectCache *projectcache.ProjectCache // RequestContextMapper maps requests to contexts RequestContextMapper kapi.RequestContextMapper AdmissionControl admission.Interface TLS bool ControllerPlug plug.Plug ControllerPlugStart func() // ImageFor is a function that returns the appropriate image to use for a named component ImageFor func(component string) string EtcdHelper storage.Interface KubeletClientConfig *kubeletclient.KubeletClientConfig // ClientCAs will be used to request client certificates in connections to the API. // This CertPool should contain all the CAs that will be used for client certificate verification. ClientCAs *x509.CertPool // APIClientCAs is used to verify client certificates presented for API auth APIClientCAs *x509.CertPool // PluginInitializer carries types used when instantiating both origin and kubernetes admission control plugins PluginInitializer oadmission.PluginInitializer // PrivilegedLoopbackClientConfig is the client configuration used to call OpenShift APIs from system components // To apply different access control to a system component, create a client config specifically for that component. PrivilegedLoopbackClientConfig restclient.Config // PrivilegedLoopbackKubernetesClient is the client used to call Kubernetes APIs from system components, // built from KubeClientConfig. It should only be accessed via the *Client() helper methods. To apply // different access control to a system component, create a separate client/config specifically for // that component. PrivilegedLoopbackKubernetesClient *kclient.Client // PrivilegedLoopbackOpenShiftClient is the client used to call OpenShift APIs from system components, // built from PrivilegedLoopbackClientConfig. It should only be accessed via the *Client() helper methods. // To apply different access control to a system component, create a separate client/config specifically // for that component. PrivilegedLoopbackOpenShiftClient *osclient.Client }
MasterConfig defines the required parameters for starting the OpenShift master
func BuildMasterConfig ¶
func BuildMasterConfig(options configapi.MasterConfig) (*MasterConfig, error)
BuildMasterConfig builds and returns the OpenShift master configuration based on the provided options
func (*MasterConfig) BuildConfigChangeControllerClients ¶ added in v1.0.5
func (c *MasterConfig) BuildConfigChangeControllerClients() (*osclient.Client, *kclient.Client)
BuildConfigChangeControllerClients returns the build config change controller client objects
func (*MasterConfig) BuildConfigWebHookClient ¶
func (c *MasterConfig) BuildConfigWebHookClient() *osclient.Client
BuildConfigWebHookClient returns the webhook client object
func (*MasterConfig) BuildControllerClients ¶
func (c *MasterConfig) BuildControllerClients() (*osclient.Client, *kclient.Client)
BuildControllerClients returns the build controller client objects
func (*MasterConfig) BuildImageChangeTriggerControllerClients ¶
func (c *MasterConfig) BuildImageChangeTriggerControllerClients() (*osclient.Client, *kclient.Client)
BuildImageChangeTriggerControllerClients returns the build image change trigger controller client objects
func (*MasterConfig) BuildLogClient ¶
func (c *MasterConfig) BuildLogClient() *kclient.Client
BuildLogClient returns the build log client object
func (*MasterConfig) BuildPodControllerClients ¶
func (c *MasterConfig) BuildPodControllerClients() (*osclient.Client, *kclient.Client)
BuildPodControllerClients returns the build pod controller client objects
func (*MasterConfig) DNSServerClient ¶
func (c *MasterConfig) DNSServerClient() *kclient.Client
DNSServerClient returns the DNS server client object It must have the following capabilities:
list, watch all services in all namespaces
func (*MasterConfig) DeployerPodControllerClients ¶
func (c *MasterConfig) DeployerPodControllerClients() (*osclient.Client, *kclient.Client)
DeployerPodControllerClients returns the deployer pod controller client objects
func (*MasterConfig) DeploymentClient ¶
func (c *MasterConfig) DeploymentClient() *kclient.Client
DeploymentClient returns the deployment client object
func (*MasterConfig) DeploymentConfigChangeControllerClients ¶
func (c *MasterConfig) DeploymentConfigChangeControllerClients() (*osclient.Client, *kclient.Client)
DeploymentConfigChangeControllerClients returns the deploymentConfig config change controller client objects
func (*MasterConfig) DeploymentConfigClients ¶ added in v1.0.7
func (c *MasterConfig) DeploymentConfigClients() (*osclient.Client, *kclient.Client)
DeploymentConfigClients returns deploymentConfig and deployment client objects
func (*MasterConfig) DeploymentConfigControllerClients ¶
func (c *MasterConfig) DeploymentConfigControllerClients() (*osclient.Client, *kclient.Client)
DeploymentConfigControllerClients returns the deploymentConfig controller client objects
func (*MasterConfig) DeploymentConfigScaleClient ¶ added in v1.0.8
func (c *MasterConfig) DeploymentConfigScaleClient() *kclient.Client
DeploymentConfigScaleClient returns the client used by the Scale subresource registry
func (*MasterConfig) DeploymentControllerClients ¶
func (c *MasterConfig) DeploymentControllerClients() (*osclient.Client, *kclient.Client)
DeploymentControllerClients returns the deployment controller client objects
func (*MasterConfig) DeploymentImageChangeTriggerControllerClient ¶
func (c *MasterConfig) DeploymentImageChangeTriggerControllerClient() *osclient.Client
DeploymentImageChangeTriggerControllerClient returns the deploymentConfig image change controller client object
func (*MasterConfig) DeploymentLogClient ¶ added in v1.0.7
func (c *MasterConfig) DeploymentLogClient() *kclient.Client
DeploymentLogClient returns the deployment log client object
func (*MasterConfig) GetRestStorage ¶
func (c *MasterConfig) GetRestStorage() map[string]rest.Storage
func (*MasterConfig) GetServiceAccountClients ¶
func (c *MasterConfig) GetServiceAccountClients(name string) (*restclient.Config, *osclient.Client, *kclient.Client, error)
GetServiceAccountClients returns an OpenShift and Kubernetes client with the credentials of the named service account in the infra namespace
func (*MasterConfig) ImageChangeControllerClient ¶
func (c *MasterConfig) ImageChangeControllerClient() *osclient.Client
ImageChangeControllerClient returns the openshift client object
func (*MasterConfig) ImageImportControllerClient ¶
func (c *MasterConfig) ImageImportControllerClient() *osclient.Client
ImageImportControllerClient returns the deployment client object
func (*MasterConfig) ImageStreamImportSecretClient ¶ added in v1.1.2
func (c *MasterConfig) ImageStreamImportSecretClient() *osclient.Client
ImageStreamImportSecretClient returns the client capable of retrieving image secrets for a namespace
func (*MasterConfig) ImageStreamSecretClient ¶ added in v1.1.2
func (c *MasterConfig) ImageStreamSecretClient() *kclient.Client
ImageStreamSecretClient returns the client capable of retrieving secrets for an image secret wrapper
func (*MasterConfig) InitializeObjects ¶ added in v1.0.5
func (c *MasterConfig) InitializeObjects()
InitializeObjects ensures objects in Kubernetes and etcd are properly populated. Requires a Kube client to be established and that etcd be started.
func (*MasterConfig) InstallProtectedAPI ¶
func (c *MasterConfig) InstallProtectedAPI(container *restful.Container) ([]string, error)
func (*MasterConfig) InstallUnprotectedAPI ¶
func (c *MasterConfig) InstallUnprotectedAPI(container *restful.Container) ([]string, error)
func (*MasterConfig) KubeClient ¶
func (c *MasterConfig) KubeClient() *kclient.Client
KubeClient returns the kubernetes client object
func (*MasterConfig) OriginNamespaceControllerClients ¶
func (c *MasterConfig) OriginNamespaceControllerClients() (*osclient.Client, *kclient.Client)
OriginNamespaceControllerClients returns a client for openshift and kubernetes. The openshift client object must have authority to delete openshift content in any namespace The kubernetes client object must have authority to execute a finalize request on a namespace
func (*MasterConfig) PolicyClient ¶
func (c *MasterConfig) PolicyClient() *osclient.Client
PolicyClient returns the policy client object It must have the following capabilities:
list, watch all policyBindings in all namespaces list, watch all policies in all namespaces create resourceAccessReviews in all namespaces
func (*MasterConfig) ResourceQuotaManagerClients ¶ added in v1.1.4
func (c *MasterConfig) ResourceQuotaManagerClients() (*osclient.Client, *internalclientset.Clientset)
ResourceQuotaManagerClients returns the client capable of retrieving resources needed for resource quota evaluation
func (*MasterConfig) RouteAllocator ¶
func (c *MasterConfig) RouteAllocator() *routeallocationcontroller.RouteAllocationController
RouteAllocator returns a route allocation controller.
func (*MasterConfig) RouteAllocatorClients ¶
func (c *MasterConfig) RouteAllocatorClients() (*osclient.Client, *kclient.Client)
RouteAllocatorClients returns the route allocator client objects
func (*MasterConfig) Run ¶
func (c *MasterConfig) Run(protected []APIInstaller, unprotected []APIInstaller)
Run launches the OpenShift master. It takes optional installers that may install additional endpoints into the server. All endpoints get configured CORS behavior Protected installers' endpoints are protected by API authentication and authorization. Unprotected installers' endpoints do not have any additional protection added.
func (*MasterConfig) RunAssetServer ¶
func (c *MasterConfig) RunAssetServer()
RunAssetServer starts the asset server for the OpenShift UI.
func (*MasterConfig) RunBuildConfigChangeController ¶ added in v1.0.5
func (c *MasterConfig) RunBuildConfigChangeController()
RunBuildConfigChangeController starts the build config change trigger controller process.
func (*MasterConfig) RunBuildController ¶
func (c *MasterConfig) RunBuildController()
RunBuildController starts the build sync loop for builds and buildConfig processing.
func (*MasterConfig) RunBuildImageChangeTriggerController ¶
func (c *MasterConfig) RunBuildImageChangeTriggerController()
RunBuildImageChangeTriggerController starts the build image change trigger controller process.
func (*MasterConfig) RunBuildPodController ¶
func (c *MasterConfig) RunBuildPodController()
RunBuildPodController starts the build/pod status sync loop for build status
func (*MasterConfig) RunDNSServer ¶
func (c *MasterConfig) RunDNSServer()
RunDNSServer starts the DNS server
func (*MasterConfig) RunDeployerPodController ¶
func (c *MasterConfig) RunDeployerPodController()
RunDeployerPodController starts the deployer pod controller process.
func (*MasterConfig) RunDeploymentConfigChangeController ¶
func (c *MasterConfig) RunDeploymentConfigChangeController()
RunDeploymentConfigChangeController starts the deployment config change controller process.
func (*MasterConfig) RunDeploymentConfigController ¶
func (c *MasterConfig) RunDeploymentConfigController()
RunDeploymentConfigController starts the deployment config controller process.
func (*MasterConfig) RunDeploymentController ¶
func (c *MasterConfig) RunDeploymentController()
RunDeploymentController starts the deployment controller process.
func (*MasterConfig) RunDeploymentImageChangeTriggerController ¶
func (c *MasterConfig) RunDeploymentImageChangeTriggerController()
RunDeploymentImageChangeTriggerController starts the image change trigger controller process.
func (*MasterConfig) RunGroupCache ¶ added in v1.0.5
func (c *MasterConfig) RunGroupCache()
RunGroupCache starts the group cache
func (*MasterConfig) RunHealth ¶ added in v1.0.5
func (c *MasterConfig) RunHealth()
func (*MasterConfig) RunImageImportController ¶
func (c *MasterConfig) RunImageImportController()
RunImageImportController starts the image import trigger controller process.
func (*MasterConfig) RunOriginNamespaceController ¶
func (c *MasterConfig) RunOriginNamespaceController()
RunOriginNamespaceController starts the controller that takes part in namespace termination of openshift content
func (*MasterConfig) RunPolicyCache ¶
func (c *MasterConfig) RunPolicyCache()
RunPolicyCache starts the policy cache
func (*MasterConfig) RunProjectAuthorizationCache ¶
func (c *MasterConfig) RunProjectAuthorizationCache()
RunProjectAuthorizationCache starts the project authorization cache
func (*MasterConfig) RunProjectCache ¶
func (c *MasterConfig) RunProjectCache()
RunProjectCache populates project cache, used by scheduler and project admission controller.
func (*MasterConfig) RunResourceQuotaManager ¶ added in v1.1.4
func (c *MasterConfig) RunResourceQuotaManager(cm *cmapp.CMServer)
RunResourceQuotaManager starts resource quota controller for OpenShift resources
func (*MasterConfig) RunSDNController ¶
func (c *MasterConfig) RunSDNController()
RunSDNController runs openshift-sdn if the said network plugin is provided
func (*MasterConfig) RunSecurityAllocationController ¶
func (c *MasterConfig) RunSecurityAllocationController()
RunSecurityAllocationController starts the security allocation controller process.
func (*MasterConfig) RunServiceAccountPullSecretsControllers ¶
func (c *MasterConfig) RunServiceAccountPullSecretsControllers()
RunServiceAccountPullSecretsControllers starts the service account pull secret controllers
func (*MasterConfig) RunServiceAccountTokensController ¶
func (c *MasterConfig) RunServiceAccountTokensController()
RunServiceAccountTokensController starts the service account token controller
func (*MasterConfig) RunServiceAccountsController ¶
func (c *MasterConfig) RunServiceAccountsController()
RunServiceAccountsController starts the service account controller
func (*MasterConfig) SDNControllerClients ¶
func (c *MasterConfig) SDNControllerClients() (*osclient.Client, *kclient.Client)
SDNControllerClients returns the SDN controller client objects
func (*MasterConfig) SdnClient ¶
func (c *MasterConfig) SdnClient() *osclient.Client
SdnClient returns the sdn client object It must have the capability to get/list/watch/create/delete HostSubnets. And have the capability to get ClusterNetwork.
func (*MasterConfig) SecurityAllocationControllerClient ¶
func (c *MasterConfig) SecurityAllocationControllerClient() *kclient.Client
SecurityAllocationControllerClient returns the security allocation controller client object
func (*MasterConfig) ServiceAccountRoleBindingClient ¶
func (c *MasterConfig) ServiceAccountRoleBindingClient() *osclient.Client
ServiceAccountRoleBindingClient returns the client object used to bind roles to service accounts It must have the following capabilities:
get, list, update, create policyBindings and clusterPolicyBindings in all namespaces
func (*MasterConfig) WebConsoleEnabled ¶ added in v1.0.5
func (c *MasterConfig) WebConsoleEnabled() bool
WebConsoleEnabled says whether web ui is not a disabled feature and asset service is configured.