Documentation ¶
Overview ¶
Package origin provides objects for creating an OpenShift Origin server
Index ¶
- Constants
- Variables
- func CreateOrUpdateDefaultOAuthClients(masterPublicAddr string, clientRegistry oauthclient.Registry)
- func GetTokenAuthenticator(etcdHelper tools.EtcdHelper) (authenticator.Token, error)
- func NewEtcdHelper(version string, client *etcdclient.Client) (helper tools.EtcdHelper, err error)
- type APIInstaller
- type AuthConfig
- type ClientWebhookInterface
- type MasterConfig
- func (c *MasterConfig) BuildClients()
- func (c *MasterConfig) BuildControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) BuildLogClient() *kclient.Client
- func (c *MasterConfig) DeployerClientConfig() *kclient.Config
- func (c *MasterConfig) DeploymentClient() *kclient.Client
- func (c *MasterConfig) DeploymentConfigChangeControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DeploymentConfigControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DeploymentControllerClients() (*osclient.Client, *kclient.Client)
- func (c *MasterConfig) DeploymentImageChangeControllerClient() *osclient.Client
- func (c *MasterConfig) EnsureCORSAllowedOrigins(origins []string)
- func (c *MasterConfig) ImageChangeControllerClient() *osclient.Client
- func (c *MasterConfig) InstallAPI(container *restful.Container) []string
- func (c *MasterConfig) KubeClient() *kclient.Client
- func (c *MasterConfig) Run(protectedInstallers []APIInstaller, unprotectedInstallers []APIInstaller)
- func (c *MasterConfig) RunAssetServer()
- func (c *MasterConfig) RunBuildController()
- func (c *MasterConfig) RunBuildImageChangeTriggerController()
- func (c *MasterConfig) RunDeploymentConfigChangeController()
- func (c *MasterConfig) RunDeploymentConfigController()
- func (c *MasterConfig) RunDeploymentController()
- func (c *MasterConfig) RunDeploymentImageChangeTriggerController()
- func (c *MasterConfig) WebHookClient() *osclient.Client
- type SwaggerAPI
Constants ¶
const ( OpenShiftOAuthAPIPrefix = "/oauth" OpenShiftLoginPrefix = "/login" OpenShiftApprovePrefix = "/oauth/approve" OpenShiftOAuthCallbackPrefix = "/oauth2callback" )
const ( OpenShiftAPIPrefix = "/osapi" OpenShiftAPIPrefixV1Beta1 = OpenShiftAPIPrefix + "/v1beta1" )
Variables ¶
var ( // OSBrowserClientBase is used as a skeleton for building a Client. We can't set the allowed redirecturis because we don't yet know the host:port of the auth server OSBrowserClientBase = oauthapi.Client{ ObjectMeta: kapi.ObjectMeta{ Name: "openshift-browser-client", }, Secret: uuid.NewUUID().String(), } OSCliClientBase = oauthapi.Client{ ObjectMeta: kapi.ObjectMeta{ Name: "openshift-challenging-client", }, Secret: uuid.NewUUID().String(), RespondWithChallenges: true, } )
Functions ¶
func CreateOrUpdateDefaultOAuthClients ¶ added in v0.2.1
func CreateOrUpdateDefaultOAuthClients(masterPublicAddr string, clientRegistry oauthclient.Registry)
func GetTokenAuthenticator ¶
func GetTokenAuthenticator(etcdHelper tools.EtcdHelper) (authenticator.Token, error)
func NewEtcdHelper ¶
func NewEtcdHelper(version string, client *etcdclient.Client) (helper tools.EtcdHelper, err error)
NewEtcdHelper returns an EtcdHelper for the provided arguments or an error if the version is incorrect.
Types ¶
type APIInstaller ¶
type APIInstaller interface { // Returns an array of strings describing what was installed InstallAPI(*restful.Container) []string }
APIInstaller installs additional API components into this server
type AuthConfig ¶
type AuthConfig struct { // URL to call internally during token request MasterAddr string // URL to direct browsers to the master on MasterPublicAddr string MasterRoots *x509.CertPool SessionSecrets []string EtcdHelper tools.EtcdHelper }
func (*AuthConfig) InstallAPI ¶
func (c *AuthConfig) InstallAPI(container *restful.Container) []string
InstallSupport 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 ¶ added in v0.2.1
func (c *AuthConfig) NewOpenShiftOAuthClientConfig(client *oauthapi.Client) *osincli.ClientConfig
NewOpenShiftOAuthClientConfig provides config for OpenShift OAuth client
type ClientWebhookInterface ¶ added in v0.2.1
ClientWebhookInterface is a webhookBuildInterface which delegates to the OpenShift client interfaces
func (ClientWebhookInterface) CreateBuild ¶ added in v0.2.1
func (c ClientWebhookInterface) CreateBuild(namespace string, build *buildapi.Build) (*buildapi.Build, error)
CreateBuild creates build using OpenShift client.
func (ClientWebhookInterface) GetBuildConfig ¶ added in v0.2.1
func (c ClientWebhookInterface) GetBuildConfig(namespace, name string) (*buildapi.BuildConfig, error)
GetBuildConfig returns buildConfig using OpenShift client.
type MasterConfig ¶
type MasterConfig struct { // host:port to bind master to MasterBindAddr string // host:port to bind asset server to AssetBindAddr string // url to access the master API on within the cluster MasterAddr string // url to access kubernetes API on within the cluster KubernetesAddr string // external clients may need to access APIs at different addresses than internal components do MasterPublicAddr string KubernetesPublicAddr string AssetPublicAddr string TLS bool CORSAllowedOrigins []*regexp.Regexp Authenticator authenticator.Request EtcdHelper tools.EtcdHelper Authorizer authorizer.Authorizer AdmissionControl admission.Interface MasterCertFile string MasterKeyFile string AssetCertFile string AssetKeyFile string // KubeClientConfig is the client configuration used to call Kubernetes APIs from system components. // To apply different access control to a system component, create a client config specifically for that component. KubeClientConfig kclient.Config // OSClientConfig 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. OSClientConfig kclient.Config // DeployerOSClientConfig is the client configuration used to call OpenShift APIs from launched deployer pods DeployerOSClientConfig kclient.Config // contains filtered or unexported fields }
MasterConfig defines the required parameters for starting the OpenShift master
func (*MasterConfig) BuildClients ¶ added in v0.2.1
func (c *MasterConfig) BuildClients()
func (*MasterConfig) BuildControllerClients ¶ added in v0.2.1
func (c *MasterConfig) BuildControllerClients() (*osclient.Client, *kclient.Client)
func (*MasterConfig) BuildLogClient ¶ added in v0.2.1
func (c *MasterConfig) BuildLogClient() *kclient.Client
func (*MasterConfig) DeployerClientConfig ¶ added in v0.2.1
func (c *MasterConfig) DeployerClientConfig() *kclient.Config
DeployerClientConfig returns the client configuration a Deployer instance launched in a pod should use when making API calls.
func (*MasterConfig) DeploymentClient ¶ added in v0.2.1
func (c *MasterConfig) DeploymentClient() *kclient.Client
func (*MasterConfig) DeploymentConfigChangeControllerClients ¶ added in v0.2.1
func (c *MasterConfig) DeploymentConfigChangeControllerClients() (*osclient.Client, *kclient.Client)
func (*MasterConfig) DeploymentConfigControllerClients ¶ added in v0.2.1
func (c *MasterConfig) DeploymentConfigControllerClients() (*osclient.Client, *kclient.Client)
func (*MasterConfig) DeploymentControllerClients ¶ added in v0.2.1
func (c *MasterConfig) DeploymentControllerClients() (*osclient.Client, *kclient.Client)
func (*MasterConfig) DeploymentImageChangeControllerClient ¶ added in v0.2.1
func (c *MasterConfig) DeploymentImageChangeControllerClient() *osclient.Client
func (*MasterConfig) EnsureCORSAllowedOrigins ¶
func (c *MasterConfig) EnsureCORSAllowedOrigins(origins []string)
EnsureCORSAllowedOrigins takes a string list of origins and attempts to covert them to CORS origin regexes, or exits if it cannot.
func (*MasterConfig) ImageChangeControllerClient ¶ added in v0.2.1
func (c *MasterConfig) ImageChangeControllerClient() *osclient.Client
func (*MasterConfig) InstallAPI ¶ added in v0.2.1
func (c *MasterConfig) InstallAPI(container *restful.Container) []string
func (*MasterConfig) KubeClient ¶
func (c *MasterConfig) KubeClient() *kclient.Client
func (*MasterConfig) Run ¶ added in v0.2.1
func (c *MasterConfig) Run(protectedInstallers []APIInstaller, unprotectedInstallers []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) RunBuildController ¶
func (c *MasterConfig) RunBuildController()
RunBuildController starts the build sync loop for builds and buildConfig processing.
func (*MasterConfig) RunBuildImageChangeTriggerController ¶ added in v0.2.1
func (c *MasterConfig) RunBuildImageChangeTriggerController()
RunDeploymentController starts the build image change trigger controller process.
func (*MasterConfig) RunDeploymentConfigChangeController ¶
func (c *MasterConfig) RunDeploymentConfigChangeController()
func (*MasterConfig) RunDeploymentConfigController ¶
func (c *MasterConfig) RunDeploymentConfigController()
func (*MasterConfig) RunDeploymentController ¶ added in v0.2.1
func (c *MasterConfig) RunDeploymentController()
RunDeploymentController starts the deployment controller process.
func (*MasterConfig) RunDeploymentImageChangeTriggerController ¶
func (c *MasterConfig) RunDeploymentImageChangeTriggerController()
func (*MasterConfig) WebHookClient ¶ added in v0.2.1
func (c *MasterConfig) WebHookClient() *osclient.Client
type SwaggerAPI ¶ added in v0.2.1
type SwaggerAPI struct{}
SwaggerAPI registers the swagger API endpoints.
func (*SwaggerAPI) InstallAPI ¶ added in v0.2.1
func (s *SwaggerAPI) InstallAPI(container *restful.Container) []string