runnerinstall

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRunnerTagName = "waypoint-runner"
)

Variables

View Source
var Platforms = map[string]RunnerInstaller{
	"ecs":        &ECSRunnerInstaller{},
	"kubernetes": &K8sRunnerInstaller{},
	"nomad":      &NomadRunnerInstaller{},
	"docker":     &DockerRunnerInstaller{},
}

Functions

This section is empty.

Types

type DockerConfig

type DockerConfig struct {
	RunnerImage string `hcl:"runner_image,optional"`
	Network     string `hcl:"network,optional"`
}

type DockerRunnerInstaller

type DockerRunnerInstaller struct {
	Config DockerConfig
}

func (*DockerRunnerInstaller) Install

func (i *DockerRunnerInstaller) Install(ctx context.Context, opts *InstallOpts) error

func (*DockerRunnerInstaller) InstallFlags

func (i *DockerRunnerInstaller) InstallFlags(set *flag.Set)

func (DockerRunnerInstaller) Uninstall

func (d DockerRunnerInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error

func (DockerRunnerInstaller) UninstallFlags

func (d DockerRunnerInstaller) UninstallFlags(set *flag.Set)

type ECSRunnerInstaller

type ECSRunnerInstaller struct {
	Config EcsConfig
}

func (*ECSRunnerInstaller) Install

func (i *ECSRunnerInstaller) Install(ctx context.Context, opts *InstallOpts) error

func (*ECSRunnerInstaller) InstallFlags

func (i *ECSRunnerInstaller) InstallFlags(set *flag.Set)

func (*ECSRunnerInstaller) Uninstall

func (i *ECSRunnerInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error

func (*ECSRunnerInstaller) UninstallFlags

func (i *ECSRunnerInstaller) UninstallFlags(set *flag.Set)

type EcsConfig

type EcsConfig struct {
	Region            string   `hcl:"region,required"`
	ExecutionRoleName string   `hcl:"execution_role_name,optional"`
	TaskRoleName      string   `hcl:"task_role_name,optional"`
	CPU               string   `hcl:"runner_cpu,optional"`
	Memory            string   `hcl:"memory_cpu,optional"`
	RunnerImage       string   `hcl:"runner_image,optional"`
	Cluster           string   `hcl:"cluster,optional"`
	Subnets           []string `hcl:"subnets,optional"`
}

type InstallOpts

type InstallOpts struct {
	Log hclog.Logger
	UI  terminal.UI

	// Cookie is the server cookie that can be used for this runner
	Cookie string

	// ServerAddr is the address of the server to which the runner
	// connects
	ServerAddr string

	// AdvertiseClient is the serverconfig.Client information for connecting
	// to the server via the AdvertiseAddr information. This also has the auth
	// token already set. This is provided as a convenience since it is common
	// to build this immediately.
	AdvertiseClient *serverconfig.Client

	// Unique ID for the runner.
	Id string
}

InstallOpts are the options sent to RunnerInstaller.Install.

type InstalledRunnerConfig

type InstalledRunnerConfig struct {
	Id string `mapstructure:"id"`
}

type K8sConfig

type K8sConfig struct {
	KubeconfigPath       string `hcl:"kubeconfig,optional"`
	K8sContext           string `hcl:"context,optional"`
	Version              string `hcl:"version,optional"`
	Namespace            string `hcl:"namespace,optional"`
	RunnerImage          string `hcl:"runner_image,optional"`
	CpuRequest           string `hcl:"runner_cpu_request,optional"`
	MemRequest           string `hcl:"runner_mem_request,optional"`
	CreateServiceAccount bool   `hcl:"odr_service_account_init,optional"`
	OdrImage             string `hcl:"odr_image"`

	CpuLimit        string `hcl:"cpu_limit,optional"`
	MemLimit        string `hcl:"mem_limit,optional"`
	ImagePullSecret string `hcl:"image_pull_secret,optional"`
	// contains filtered or unexported fields
}

type K8sRunnerInstaller

type K8sRunnerInstaller struct {
	k8sinstallutil.K8sInstaller
	Config K8sConfig
}

func (*K8sRunnerInstaller) Install

func (i *K8sRunnerInstaller) Install(ctx context.Context, opts *InstallOpts) error

func (*K8sRunnerInstaller) InstallFlags

func (i *K8sRunnerInstaller) InstallFlags(set *flag.Set)

func (*K8sRunnerInstaller) Uninstall

func (i *K8sRunnerInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error

func (*K8sRunnerInstaller) UninstallFlags

func (i *K8sRunnerInstaller) UninstallFlags(set *flag.Set)

type Logging

type Logging struct {
	CreateGroup      bool   `hcl:"create_group,optional"`
	StreamPrefix     string `hcl:"stream_prefix,optional"`
	DateTimeFormat   string `hcl:"datetime_format,optional"`
	MultilinePattern string `hcl:"multiline_pattern,optional"`
	Mode             string `hcl:"mode,optional"`
	MaxBufferSize    string `hcl:"max_buffer_size,optional"`
}

type NomadConfig

type NomadConfig struct {
	AuthSoftFail       bool              `hcl:"auth_soft_fail,optional"`
	Namespace          string            `hcl:"namespace,optional"`
	ServiceAnnotations map[string]string `hcl:"service_annotations,optional"`

	RunnerImage string `hcl:"runner_image,optional"`
	OdrImage    string `hcl:"odr_image,optional"`

	Region         string   `hcl:"namespace,optional"`
	Datacenters    []string `hcl:"datacenters,optional"`
	PolicyOverride bool     `hcl:"policy_override,optional"`

	RunnerResourcesCPU    string `hcl:"runner_resources_cpu,optional"`
	RunnerResourcesMemory string `hcl:"runner_resources_memory,optional"`

	HostVolume           string            `hcl:"host_volume,optional"`
	CsiVolumeProvider    string            `hcl:"csi_volume_provider,optional"`
	CsiVolumeCapacityMin int64             `hcl:"csi_volume_capacity_min,optional"`
	CsiVolumeCapacityMax int64             `hcl:"csi_volume_capacity_max,optional"`
	CsiFS                string            `hcl:"csi_fs,optional"`
	CsiTopologies        map[string]string `hcl:"nomad_csi_topologies,optional"`
	CsiExternalId        string            `hcl:"nomad_csi_external_id,optional"`
	CsiPluginId          string            `hcl:"nomad_csi_plugin_id,required"`
	CsiSecrets           map[string]string `hcl:"nomad_csi_secrets,optional"`

	NomadHost string `hcl:"nomad_host,optional"`
}

type NomadRunnerInstaller

type NomadRunnerInstaller struct {
	Config NomadConfig
}

func (*NomadRunnerInstaller) Install

func (i *NomadRunnerInstaller) Install(ctx context.Context, opts *InstallOpts) error

func (*NomadRunnerInstaller) InstallFlags

func (i *NomadRunnerInstaller) InstallFlags(set *flag.Set)

func (*NomadRunnerInstaller) Uninstall

func (i *NomadRunnerInstaller) Uninstall(ctx context.Context, opts *InstallOpts) error

func (*NomadRunnerInstaller) UninstallFlags

func (i *NomadRunnerInstaller) UninstallFlags(set *flag.Set)

type RunnerInstaller

type RunnerInstaller interface {
	// Install expects a Waypoint Runner to be installed
	Install(context.Context, *InstallOpts) error

	// InstallFlags is called prior to Install and allows the installer to
	// specify flags for the install CLI. The flags should be prefixed with
	// the platform name to avoid conflicts with other flags.
	InstallFlags(*flag.Set)

	// Uninstall should remove the runner(s) installed via Install.
	Uninstall(context.Context, *InstallOpts) error

	// UninstallFlags is called prior to Uninstall and allows the Uninstaller to
	// specify flags for the uninstall CLI. The flags should be prefixed with the
	// platform name to avoid conflicts with other flags.
	UninstallFlags(*flag.Set)
}

Jump to

Keyboard shortcuts

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