Documentation
¶
Index ¶
- Variables
- func ValidateConfig(cfg Config) error
- type APIConfig
- type BootstrapLease
- type BootstrapRefs
- type Bootstrapper
- type Cache
- type Claim
- type Config
- type HTTPPodClient
- func (c *HTTPPodClient) Create(ctx context.Context, spec PodSpec) (Pod, error)
- func (c *HTTPPodClient) Delete(ctx context.Context, ref PodRef) error
- func (c *HTTPPodClient) EnsureClaim(ctx context.Context, claim Claim) error
- func (c *HTTPPodClient) Exec(ctx context.Context, ref PodRef, command []string, stdin io.Reader, ...) (int, error)
- func (c *HTTPPodClient) Get(ctx context.Context, ref PodRef) (Pod, error)
- func (c *HTTPPodClient) List(ctx context.Context, labels map[string]string) ([]Pod, error)
- type Pod
- type PodClient
- type PodRef
- type PodSpec
- type Resources
- type Runtime
- func (r *Runtime) ApplyPatch(ctx context.Context, workspace sandbox.Workspace, patches []sandbox.Patch) error
- func (r *Runtime) Close() error
- func (r *Runtime) CollectArtifact(ctx context.Context, workspace sandbox.Workspace, name string) (sandbox.Artifact, error)
- func (r *Runtime) Destroy(ctx context.Context, workspace sandbox.Workspace) error
- func (r *Runtime) ExecuteBoundedCommand(ctx context.Context, workspace sandbox.Workspace, command sandbox.Command) (sandbox.CommandResult, error)
- func (r *Runtime) PreparePinnedWorkspace(ctx context.Context, in sandbox.WorkspaceRequest) (sandbox.Workspace, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBoundary = errors.New("Kubernetes workspace violates execution boundary")
View Source
var ErrEgressBootstrap = errors.New("registry egress bootstrap unavailable")
View Source
var ErrOutputLimit = errors.New("Kubernetes exec output limit exceeded")
View Source
var ErrTransport = errors.New("Kubernetes API transport failed")
Functions ¶
func ValidateConfig ¶
Types ¶
type BootstrapLease ¶
type BootstrapRefs ¶
type Bootstrapper ¶
type Bootstrapper interface {
Prepare(context.Context, sandbox.WorkspaceRequest, string) (BootstrapLease, error)
}
func NewRegistryBootstrapper ¶
func NewRegistryBootstrapper(broker *egress.Broker, advertisedAddr string) (Bootstrapper, error)
type Config ¶
type Config struct {
Namespace string
RunnerID string
RuntimeClassName string
ImagePullSecrets []string
Images map[string]string
Cache Cache
MemoryBytes int64
DiskBytes int64
CPUs int64
MaxProcesses int64
Fetch func(context.Context, sandbox.WorkspaceRequest) (sandbox.Snapshot, error)
Client PodClient
Bootstrapper Bootstrapper
ReadyTimeout time.Duration
PollInterval time.Duration
}
type HTTPPodClient ¶
type HTTPPodClient struct {
// contains filtered or unexported fields
}
func NewHTTPPodClient ¶
func NewHTTPPodClient(cfg APIConfig) (*HTTPPodClient, error)
func (*HTTPPodClient) Delete ¶
func (c *HTTPPodClient) Delete(ctx context.Context, ref PodRef) error
func (*HTTPPodClient) EnsureClaim ¶ added in v0.2.33
func (c *HTTPPodClient) EnsureClaim(ctx context.Context, claim Claim) error
type PodClient ¶
type PodClient interface {
Create(context.Context, PodSpec) (Pod, error)
Get(context.Context, PodRef) (Pod, error)
List(context.Context, map[string]string) ([]Pod, error)
Exec(context.Context, PodRef, []string, io.Reader, io.Writer, io.Writer) (int, error)
Delete(context.Context, PodRef) error
EnsureClaim(context.Context, Claim) error
}
type PodSpec ¶
type PodSpec struct {
Ref PodRef
Labels map[string]string
Image string
RuntimeClassName string
ImagePullSecrets []string
ContainerName string
WorkingDirectory string
Environment []string
RunAsUser int64
RunAsNonRoot bool
RunAsGroup int64
FSGroup int64
AllowPrivilegeEscalation bool
ReadOnlyRootFilesystem bool
DropCapabilities []string
SeccompProfile string
AutomountServiceAccountToken bool
HostNetwork bool
HostPID bool
HostIPC bool
HostPaths []string
CacheClaim string
WorkspaceEmptyDirBytes int64
TempEmptyDirBytes int64
NetworkProfile string
Resources Resources
ActiveDeadlineSeconds int64
RestartPolicy string
Bootstrap BootstrapRefs
}
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func NewRuntime ¶
func (*Runtime) ApplyPatch ¶
func (*Runtime) CollectArtifact ¶
func (*Runtime) ExecuteBoundedCommand ¶
func (*Runtime) PreparePinnedWorkspace ¶
Click to show internal directories.
Click to hide internal directories.