runnerconfig

package
v0.19.1302 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: AGPL-3.0 Imports: 6 Imported by: 1 module, 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

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GitRef string `config:"git_ref" validate:"required"`

	RunnerAPIURL     string `config:"runner_api_url" validate:"required"`
	RunnerAPIToken   string `config:"runner_api_token"`
	RunnerID         string `config:"runner_id" validate:"required"`
	RunnerPlatform   string `config:"runner_platform"`
	RunnerAuthMethod string `config:"runner_auth_method"` // aws: "" or "iid" (default), "sts", "sts-bound"

	// observability configuration
	HostIP   string `config:"host_ip" validate:"required"`
	LogLevel string `config:"log_level"`

	// some artifacts are bundled into the runner binary, to make loading them easier.
	BundleDir    string `config:"bundle_dir" validate:"required"`
	RegistryDir  string `config:"registry_dir" validate:"required"`
	RegistryPort int    `config:"registry_port" validate:"required"`

	// HealthPort is the port the mng process serves its /healthz endpoint on.
	// Azure's VMSS Application Health extension probes this to drive automatic
	// instance repair (the self-heal analog to the AWS ASG EC2 health check).
	HealthPort int `config:"health_port" validate:"required"`

	// kubernetes pod identity and self-deletion
	PodName             string `config:"pod_name"`
	PodNamespace        string `config:"pod_namespace"`
	DeploymentName      string `config:"deployment_name"`
	DeletePodOnShutdown bool   `config:"delete_pod_on_shutdown"`

	// only for enabling local things
	IsNuonctl                bool          `config:"is_nuonctl"`
	SandboxJobDuration       time.Duration `config:"sandbox_job_duration"`
	SandboxModeFaultsEnabled bool          `config:"sandbox_mode_faults_enabled"`
	SandboxControlPort       int           `config:"sandbox_control_port"`

	// TerraformMirrorPlatforms overrides the `<os>_<arch>` platform set
	// the build runner vendors providers for via `terraform providers
	// mirror`. When empty, the build runner defaults to the runner's own
	// runtime platform (one entry, runtime.GOOS_runtime.GOARCH).
	//
	// Set via env var TERRAFORM_MIRROR_PLATFORMS as a comma-separated
	// list, e.g. `linux_amd64,linux_arm64,darwin_arm64`. Useful when
	// vendoring artifacts that need to be consumed by install runners
	// on a different platform than the build runner (heterogeneous
	// orgs, cross-arch dev/test).
	TerraformMirrorPlatforms []string `config:"terraform_mirror_platforms"`

	// TagOCIIndexChildren tags each child manifest of a copied image index.
	TagOCIIndexChildren bool `config:"tag_oci_index_children"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() (*Config, error)

func (*Config) APIToken added in v0.19.1286

func (c *Config) APIToken() string

APIToken returns the current runner API token. Read it at the point of use rather than caching it, because the token is refreshed while the process runs.

func (*Config) SetAPIToken added in v0.19.1286

func (c *Config) SetAPIToken(token string)

Jump to

Keyboard shortcuts

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