controller

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// DefaultWorkerServiceAccountName is the default Kubernetes worker service account name
	DefaultWorkerServiceAccountName = "brigade-worker"
	// DefaultJobServiceAccountName is the default Brigade project service account name
	DefaultJobServiceAccountName = "brigade-worker"
)

Variables

View Source
var (
	// ErrNoBuildID indicates that a secret does not have a build ID attached.
	ErrNoBuildID = errors.New("no build ID on secret")
)

Functions

func NewWorkerPod added in v0.19.0

func NewWorkerPod(build, project *v1.Secret, config *Config) v1.Pod

NewWorkerPod returns pod context to create a worker pod

Types

type Config added in v0.4.0

type Config struct {
	Namespace                  string
	WorkerImage                string
	WorkerCommand              string
	WorkerPullPolicy           string
	WorkerServiceAccount       string
	ProjectServiceAccount      string
	ProjectServiceAccountRegex string
	WorkerRequestsCPU          string
	WorkerRequestsMemory       string
	WorkerLimitsCPU            string
	WorkerLimitsMemory         string
	DefaultBuildStorageClass   string
	DefaultCacheStorageClass   string
}

Config is config for setting Controller

type Controller

type Controller struct {
	*Config
	// contains filtered or unexported fields
}

Controller listens for new brigade builds and starts the worker pods.

func NewController

func NewController(clientset kubernetes.Interface, config *Config) *Controller

NewController creates a new Controller.

func (*Controller) HasSynced

func (c *Controller) HasSynced() bool

HasSynced returns true if the controller has synced.

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh chan struct{})

Run executes the controller.

Jump to

Keyboard shortcuts

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