origin

package
v0.0.0-...-6079644 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2015 License: Apache-2.0 Imports: 94 Imported by: 0

Documentation

Overview

Package origin provides objects for creating an OpenShift Origin server

Index

Constants

View Source
const (
	OpenShiftOAuthAPIPrefix      = "/oauth"
	OpenShiftLoginPrefix         = "/login"
	OpenShiftApprovePrefix       = "/oauth/approve"
	OpenShiftOAuthCallbackPrefix = "/oauth2callback"
)
View Source
const (
	OpenShiftAPIPrefix        = "/osapi"
	OpenShiftAPIPrefixV1Beta1 = OpenShiftAPIPrefix + "/v1beta1"
)

Variables

View Source
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

func CreateOrUpdateDefaultOAuthClients(masterAddr 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 {
	MasterAddr     string
	MasterRoots    *x509.CertPool
	SessionSecrets []string
	EtcdHelper     tools.EtcdHelper
}

func (*AuthConfig) InstallAPI

func (c *AuthConfig) InstallAPI(container *restful.Container) []string

InstallAPI starts an OAuth2 server 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 (*AuthConfig) NewOpenShiftOAuthClientConfig

func (c *AuthConfig) NewOpenShiftOAuthClientConfig(client *oauthapi.Client) *osincli.ClientConfig

NewOpenShiftOAuthClientConfig provides config for OpenShift OAuth client

type ClientWebhookInterface

type ClientWebhookInterface struct {
	Client osclient.Interface
}

ClientWebhookInterface is a webhookBuildInterface which delegates to the OpenShift client interfaces

func (ClientWebhookInterface) CreateBuild

func (c ClientWebhookInterface) CreateBuild(namespace string, build *buildapi.Build) (*buildapi.Build, error)

CreateBuild creates build using OpenShift client.

func (ClientWebhookInterface) GetBuildConfig

func (c ClientWebhookInterface) GetBuildConfig(namespace, name string) (*buildapi.BuildConfig, error)

GetBuildConfig returns buildConfig using OpenShift client.

type MasterConfig

type MasterConfig struct {
	BindAddr       string
	MasterAddr     string
	AssetAddr      string
	KubernetesAddr string

	TLS bool

	CORSAllowedOrigins    []*regexp.Regexp
	RequireAuthentication bool

	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

func (c *MasterConfig) BuildClients()

func (*MasterConfig) BuildControllerClients

func (c *MasterConfig) BuildControllerClients() (*osclient.Client, *kclient.Client)

func (*MasterConfig) BuildLogClient

func (c *MasterConfig) BuildLogClient() *kclient.Client

func (*MasterConfig) DeployerClientConfig

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

func (c *MasterConfig) DeploymentClient() *kclient.Client

func (*MasterConfig) DeploymentConfigChangeControllerClients

func (c *MasterConfig) DeploymentConfigChangeControllerClients() (*osclient.Client, *kclient.Client)

func (*MasterConfig) DeploymentConfigControllerClients

func (c *MasterConfig) DeploymentConfigControllerClients() (*osclient.Client, *kclient.Client)

func (*MasterConfig) DeploymentControllerClients

func (c *MasterConfig) DeploymentControllerClients() (*osclient.Client, *kclient.Client)

func (*MasterConfig) DeploymentImageChangeControllerClient

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

func (c *MasterConfig) ImageChangeControllerClient() *osclient.Client

func (*MasterConfig) InstallAPI

func (c *MasterConfig) InstallAPI(container *restful.Container) []string

func (*MasterConfig) KubeClient

func (c *MasterConfig) KubeClient() *kclient.Client

func (*MasterConfig) RunAPI

func (c *MasterConfig) RunAPI(installers ...APIInstaller)

RunAPI launches the OpenShift master. It takes optional API installers that may install additional endpoints into the server.

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

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

func (c *MasterConfig) RunDeploymentController()

RunDeploymentController starts the deployment controller process.

func (*MasterConfig) RunDeploymentImageChangeTriggerController

func (c *MasterConfig) RunDeploymentImageChangeTriggerController()

func (*MasterConfig) WebHookClient

func (c *MasterConfig) WebHookClient() *osclient.Client

type SwaggerAPI

type SwaggerAPI struct{}

SwaggerAPI registers the swagger API endpoints.

func (*SwaggerAPI) InstallAPI

func (s *SwaggerAPI) InstallAPI(container *restful.Container) []string

Jump to

Keyboard shortcuts

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