podrun

package
v1.1.34 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBMSSpec

type DBMSSpec struct {
	// ContainerImage container image to use
	ContainerImage string
	// Env environment variables to set (stored in K8s secret)
	Env map[string]string
	// Scripts to mount on the pod (stored in K8s secret)
	Scripts map[string][]byte
	// ScriptsMount mount point for scripts
	ScriptsMount string
}

DBMSSpec DBMS-specific pod settings

type Pod

type Pod interface {
	// Exec execute a command inside the pod's client container
	Exec(cmd []string) error
	// ExecInteractive executes a command inside the pod's client container, with stdin/stdout/stderr
	// connected to current process's stdin/stdout/stderr
	ExecInteractive(cmd []string) error
	// Delete delete pod
	Delete() error
	// Close alias for Delete
	Close() error
}

Pod represents a pod launched in the cluster by Runner

type ProviderSpec

type ProviderSpec struct {
	// Sidecar optional sidecar to add to pod
	Sidecar *v1.Container
	// ServiceAccount Kubernetes service account to use for running pod
	ServiceAccount string
}

ProviderSpec platform-dependent pod settings

type Runner

type Runner interface {
	Create(Spec) (Pod, error)
	Cleanup() error
}

func New

func New(connection api.Connection, clients k8s.Clients) (Runner, error)

type Spec

type Spec struct {
	DBMSSpec
	ProviderSpec
}

Spec settings for a pod that will be provisioned by the K8s pod runner

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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