workercmd

package
v6.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 32 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotRoot = errors.New("worker must be run as root")

Functions

This section is empty.

Types

type Certs

type Certs struct {
	Dir string `long:"certs-dir" description:"Directory to use when creating the resource certificates volume."`
}

type CmdRunner

type CmdRunner struct {
	Cmd *exec.Cmd
}

func (CmdRunner) Run

func (runner CmdRunner) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type ContainerdRuntime

type ContainerdRuntime struct {
	Config         flag.File     `long:"config"     description:"Path to a config file to use for the Containerd daemon."`
	Bin            string        `long:"bin"        description:"Path to a containerd executable (non-absolute names get resolved from $PATH)."`
	RequestTimeout time.Duration `` /* 126-byte string literal not displayed */

	//TODO can DNSConfig be simplifed to just a bool rather than struct with a bool?
	DNS                DNSConfig `group:"DNS Proxy Configuration" namespace:"dns-proxy"`
	DNSServers         []string  `` /* 138-byte string literal not displayed */
	RestrictedNetworks []string  `` /* 140-byte string literal not displayed */
	MaxContainers      int       `long:"max-containers" default:"0" description:"Max container capacity. 0 means no limit."`
	NetworkPool        string    `long:"network-pool" default:"10.80.0.0/16" description:"Network range to use for dynamically allocated container subnets."`
}

type DNSConfig

type DNSConfig struct {
	Enable bool `long:"enable" description:"Enable proxy DNS server."`
}

func (DNSConfig) Server

func (config DNSConfig) Server() (*dns.Server, error)

type GuardianRuntime

type GuardianRuntime struct {
	Bin            string        `long:"bin"        description:"Path to a garden server executable (non-absolute names get resolved from $PATH)."`
	Config         flag.File     `` /* 179-byte string literal not displayed */
	DNS            DNSConfig     `group:"DNS Proxy Configuration" namespace:"dns-proxy"`
	RequestTimeout time.Duration `` /* 133-byte string literal not displayed */
}

type RuntimeConfiguration

type RuntimeConfiguration struct {
	Runtime string `` /* 210-byte string literal not displayed */
}

type WorkerCommand

type WorkerCommand struct {
	Worker WorkerConfig

	TSA worker.TSAConfig `group:"TSA Configuration" namespace:"tsa"`

	Certs Certs

	WorkDir flag.Dir `long:"work-dir" required:"true" description:"Directory in which to place container data."`

	BindIP   flag.IP `long:"bind-ip"   default:"127.0.0.1" description:"IP address on which to listen for the Garden server."`
	BindPort uint16  `long:"bind-port" default:"7777"      description:"Port on which to listen for the Garden server."`

	DebugBindIP   flag.IP `long:"debug-bind-ip"   default:"127.0.0.1" description:"IP address on which to listen for the pprof debugger endpoints."`
	DebugBindPort uint16  `long:"debug-bind-port" default:"7776"      description:"Port on which to listen for the pprof debugger endpoints."`

	HealthcheckBindIP   flag.IP       `long:"healthcheck-bind-ip"    default:"0.0.0.0"  description:"IP address on which to listen for health checking requests."`
	HealthcheckBindPort uint16        `long:"healthcheck-bind-port"  default:"8888"     description:"Port on which to listen for health checking requests."`
	HealthCheckTimeout  time.Duration `long:"healthcheck-timeout"    default:"5s"       description:"HTTP timeout for the full duration of health checking."`

	SweepInterval               time.Duration `` /* 133-byte string literal not displayed */
	VolumeSweeperMaxInFlight    uint16        `long:"volume-sweeper-max-in-flight" default:"3" description:"Maximum number of volumes which can be swept in parallel."`
	ContainerSweeperMaxInFlight uint16        `long:"container-sweeper-max-in-flight" default:"5" description:"Maximum number of containers which can be swept in parallel."`

	RebalanceInterval time.Duration `` /* 139-byte string literal not displayed */

	ConnectionDrainTimeout time.Duration `` /* 147-byte string literal not displayed */

	RuntimeConfiguration `group:"Runtime Configuration"`

	// This refers to flags relevant to the operation of the Guardian runtime.
	// For historical reasons it is namespaced under "garden" i.e. CONCOURSE_GARDEN instead of "guardian" i.e. CONCOURSE_GUARDIAN
	Guardian GuardianRuntime `group:"Guardian Configuration" namespace:"garden"`

	Containerd ContainerdRuntime `group:"Containerd Configuration" namespace:"containerd"`

	ExternalGardenURL flag.URL `` /* 146-byte string literal not displayed */

	Baggageclaim baggageclaimcmd.BaggageclaimCommand `group:"Baggageclaim Configuration" namespace:"baggageclaim"`

	ResourceTypes flag.Dir `long:"resource-types" description:"Path to directory containing resource types the worker should advertise."`

	Logger flag.Lager
}

func (*WorkerCommand) Execute

func (cmd *WorkerCommand) Execute(args []string) error

func (WorkerCommand) LessenRequirements

func (cmd WorkerCommand) LessenRequirements(prefix string, command *flags.Command)

func (*WorkerCommand) Runner

func (cmd *WorkerCommand) Runner(args []string) (ifrit.Runner, error)

type WorkerConfig

type WorkerConfig struct {
	Name     string   `long:"name"  description:"The name to set for the worker during registration. If not specified, the hostname will be used."`
	Tags     []string `long:"tag"   description:"A tag to set during registration. Can be specified multiple times."`
	TeamName string   `long:"team"  description:"The name of the team that this worker will be assigned to."`

	HTTPProxy  string `long:"http-proxy"  env:"http_proxy"                  description:"HTTP proxy endpoint to use for containers."`
	HTTPSProxy string `long:"https-proxy" env:"https_proxy"                 description:"HTTPS proxy endpoint to use for containers."`
	NoProxy    string `long:"no-proxy"    env:"no_proxy"                    description:"Blacklist of addresses to skip the proxy when reaching."`

	Ephemeral bool `long:"ephemeral" description:"If set, the worker will be immediately removed upon stalling."`

	Version string `` /* 130-byte string literal not displayed */
}

func (WorkerConfig) Worker

func (c WorkerConfig) Worker() atc.Worker

Jump to

Keyboard shortcuts

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