build

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 49 Imported by: 31

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildController

type BuildController struct {
	// contains filtered or unexported fields
}

BuildController watches builds and synchronizes them with their corresponding build pods. It is also responsible for resolving image stream references in the Build to docker images prior to invoking the pod. The build controller late binds image stream references so that users can create a build config before they create the image stream (or before an image is pushed to a tag) which allows actions to converge. It also allows multiple Build objects to directly reference images created by another Build, acting as a simple dependency graph for a logical multi-image build that reuses many individual Builds.

Like other controllers that do "on behalf of" image resolution, the controller resolves the reference which allows users to see what image ID corresponds to a tag simply by requesting resolution. This is consistent with other image policy in the system (image tag references in deployments, triggers, and image policy). The only leaked image information is the ID which is considered acceptable. Secrets are also resolved, allowing a user in the same namespace to in theory infer the presence of a secret or make it usable by a build - but this is identical to our existing model where a service account determines access to secrets used in pods.

func NewBuildController

func NewBuildController(params *BuildControllerParams) *BuildController

NewBuildController creates a new BuildController.

func (*BuildController) Run

func (bc *BuildController) Run(workers int, stopCh <-chan struct{})

Run begins watching and syncing.

type BuildControllerParams

type BuildControllerParams struct {
	BuildInformer                    buildv1informer.BuildInformer
	BuildConfigInformer              buildv1informer.BuildConfigInformer
	BuildControllerConfigInformer    configv1informer.BuildInformer
	ImageConfigInformer              configv1informer.ImageInformer
	ImageStreamInformer              imagev1informer.ImageStreamInformer
	PodInformer                      kubeinformers.PodInformer
	SecretInformer                   kubeinformers.SecretInformer
	OpenshiftConfigConfigMapInformer kubeinformers.ConfigMapInformer
	KubeClient                       kubernetes.Interface
	BuildClient                      buildv1client.Interface
	DockerBuildStrategy              *strategy.DockerBuildStrategy
	SourceBuildStrategy              *strategy.SourceBuildStrategy
	CustomBuildStrategy              *strategy.CustomBuildStrategy
	BuildDefaults                    builddefaults.BuildDefaults
	BuildOverrides                   buildoverrides.BuildOverrides
	InternalRegistryHostname         string
}

BuildControllerParams is the set of parameters needed to create a new BuildController

Directories

Path Synopsis
Package defaults contains the BuildDefaults admission control plugin.
Package defaults contains the BuildDefaults admission control plugin.
Package overrides contains the BuildOverrides admission control plugin.
Package overrides contains the BuildOverrides admission control plugin.

Jump to

Keyboard shortcuts

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