substrate

package
v0.27.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package substrate connects Obot's instance controller to Substrate v0.3.0.

Index

Constants

View Source
const (
	Finalizer = "obot.obot.ai/substrate-agent"
)

Variables

This section is empty.

Functions

func Ref

func Ref(instance *v1.AgentInstance) *pb.ObjectRef

func ValidateWorkerScheduling

func ValidateWorkerScheduling(selector map[string]string, tolerations []corev1.Toleration) error

Types

type Client

type Client struct {
	Kube    kclient.Client
	Control pb.ControlClient
	Config  Config
}

func New

func New(ctx context.Context, config Config) (*Client, error)

func (*Client) CollectOrphans

func (c *Client) CollectOrphans(ctx context.Context, instances []v1.AgentInstance, deleteExecution func(context.Context, *pb.ObjectRef) error) error

CollectOrphans recovers resources left behind after interrupted provisioning or database loss. Only Obot execution templates are considered; golden actors are collected by Substrate when their owning template is deleted.

func (*Client) DeleteExecution

func (c *Client) DeleteExecution(ctx context.Context, ref *pb.ObjectRef) error

func (*Client) EnsureClaude

func (c *Client) EnsureClaude(ctx context.Context, instance *v1.AgentInstance, secrets map[string]string, egressHosts []string, allowAllEgress bool, egressSecrets []gt.ClaudeEgressSecret) (*pb.Actor, error)

func (*Client) ReconcileWorkerPools

func (c *Client) ReconcileWorkerPools(ctx context.Context, environments []types.ClaudeEnvironment, inUse map[string]bool, mutate func(context.Context, string, *types.ClaudeEnvironment, func(context.Context) error) error) error

Worker pools belong to environments; each environment has an independent capacity budget, shared by all its matching profiles and sessions.

type Config

type Config struct {
	WorkerNodeSelector map[string]string
	WorkerTolerations  []corev1.Toleration
	WorkerImage        string
	RunnerImage        string
	Namespace          string
	Address            string
	CAFile             string
	TokenFile          string
	SnapshotLocation   string
	ObotURL            string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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