v1beta3

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderResourceAdd    = ProviderResourceEvent("add")
	ProviderResourceUpdate = ProviderResourceEvent("update")
	ProviderResourceDelete = ProviderResourceEvent("delete")
)

Variables

View Source
var (
	// ErrInsufficientCapacity is the new error when capacity is insufficient
	ErrInsufficientCapacity  = errors.New("insufficient capacity")
	ErrGroupResourceMismatch = errors.New("group resource mismatch")
	// ErrInvalidInterconnectGroup rejects bids whose interconnect group
	// label could never be applied to a pod: the group name is stamped
	// verbatim as a Kubernetes label value (and anti-affinity selector),
	// so a name the kube API would reject at admission must fail the bid
	// instead of producing a paid lease whose workloads cannot deploy.
	ErrInvalidInterconnectGroup = errors.New("invalid interconnect group")
)

Functions

func FilterGPUInterface

func FilterGPUInterface(val string) string

FilterGPUInterface ensures interface values are always lower case generalizes sxm* to sxm

Types

type Deployment

type Deployment struct {
	Lid         mtypes.LeaseID
	MGroup      *maniv2beta2.Group
	CParams     interface{}
	ResourceVer string
}

func (*Deployment) ClusterParams

func (d *Deployment) ClusterParams() interface{}

func (*Deployment) LeaseID

func (d *Deployment) LeaseID() mtypes.LeaseID

func (*Deployment) ManifestGroup

func (d *Deployment) ManifestGroup() *maniv2beta2.Group

func (*Deployment) ResourceVersion added in v0.6.5

func (d *Deployment) ResourceVersion() string

type EventsWatcher

type EventsWatcher interface {
	Shutdown()
	Done() <-chan struct{}
	ResultChan() <-chan *eventsv1.Event
	SendEvent(*eventsv1.Event) bool
}

func NewEventsFeed

func NewEventsFeed(ctx context.Context) EventsWatcher

type ExecResult

type ExecResult interface {
	ExitCode() int
}

type HostnameServiceClient

type HostnameServiceClient interface {
	ReserveHostnames(ctx context.Context, hostnames []string, leaseID mtypes.LeaseID) ([]string, error)
	ReleaseHostnames(leaseID mtypes.LeaseID) error
	CanReserveHostnames(hostnames []string, ownerAddr sdktypes.Address) error
	PrepareHostnamesForTransfer(ctx context.Context, hostnames []string, leaseID mtypes.LeaseID) error
}

type IDeployment

type IDeployment interface {
	LeaseID() mtypes.LeaseID
	ManifestGroup() *maniv2beta2.Group
	ClusterParams() interface{}
	ResourceVersion() string
}

IDeployment interface defined with LeaseID and ManifestGroup methods

type Inventory

type Inventory interface {
	Adjust(ReservationGroup, ...InventoryOption) error
	Metrics() inventoryV1.Metrics
	Snapshot() inventoryV1.Cluster
	Dup() Inventory
}

type InventoryOption

type InventoryOption func(*InventoryOptions) *InventoryOptions

func WithDryRun

func WithDryRun() InventoryOption

func WithTEEPlatform added in v0.16.0

func WithTEEPlatform(t TEEPlatform) InventoryOption

func WithTEEType added in v0.16.0

func WithTEEType(t TEEType) InventoryOption

type InventoryOptions

type InventoryOptions struct {
	DryRun      bool
	TEEType     TEEType
	TEEPlatform TEEPlatform // detected at startup from node labels
}

type LeaseEvent

type LeaseEvent struct {
	Type                string           `json:"type" yaml:"type"`
	ReportingController string           `json:"reportingController,omitempty" yaml:"reportingController"`
	ReportingInstance   string           `json:"reportingInstance,omitempty" yaml:"reportingInstance"`
	Reason              string           `json:"reason" yaml:"reason"`
	Note                string           `json:"note" yaml:"note"`
	Object              LeaseEventObject `json:"object" yaml:"object"`
}

type LeaseEventObject

type LeaseEventObject struct {
	Kind      string `json:"kind" yaml:"kind"`
	Namespace string `json:"namespace" yaml:"namespace"`
	Name      string `json:"name" yaml:"name"`
}

type MGroup

type MGroup interface {
	ManifestGroup() mani.Group
}

type ProviderResourceEvent

type ProviderResourceEvent string

type Reservation

type Reservation interface {
	OrderID() mtypes.OrderID
	Allocated() bool
	ReservationGroup
}

Reservation interface implements orders and resources

type ReservationGroup

type ReservationGroup interface {
	Resources() dtypes.ResourceGroup
	SetAllocatedResources(dtypes.ResourceUnits)
	GetAllocatedResources() dtypes.ResourceUnits
	SetClusterParams(interface{})
	ClusterParams() interface{}
}

type RuntimeClass added in v0.16.0

type RuntimeClass string

RuntimeClass identifies a Kubernetes RuntimeClass for workload scheduling.

const (
	RuntimeClassKataQemuSNP          RuntimeClass = "kata-qemu-snp"
	RuntimeClassKataQemuNvidiaGPUSNP RuntimeClass = "kata-qemu-nvidia-gpu-snp"
	RuntimeClassKataQemuTDX          RuntimeClass = "kata-qemu-tdx"
	RuntimeClassKataQemuNvidiaGPUTDX RuntimeClass = "kata-qemu-nvidia-gpu-tdx"
)

func (RuntimeClass) Is added in v0.16.0

func (rc RuntimeClass) Is(opts ...RuntimeClassOption) bool

Is checks whether rc is a known runtime class matching all the given filters. With no options it matches any known runtime class.

func (RuntimeClass) String added in v0.16.0

func (rc RuntimeClass) String() string

type RuntimeClassOption added in v0.16.0

type RuntimeClassOption func(*runtimeClassFilter)

func WithCC added in v0.16.0

func WithCC() RuntimeClassOption

func WithGPU added in v0.16.0

func WithGPU() RuntimeClassOption

func WithSNP added in v0.16.0

func WithSNP() RuntimeClassOption

func WithTDX added in v0.16.0

func WithTDX() RuntimeClassOption

type ServiceLog

type ServiceLog struct {
	Name    string
	Stream  io.ReadCloser
	Scanner *bufio.Scanner
}

ServiceLog stores name, stream and scanner

type TEEPlatform added in v0.16.0

type TEEPlatform string

TEEPlatform represents the detected TEE platform on the cluster nodes.

const (
	TEEPlatformNone TEEPlatform = ""
	TEEPlatformTDX  TEEPlatform = "tdx"
	TEEPlatformSNP  TEEPlatform = "snp"
)

type TEEType added in v0.16.0

type TEEType string

TEEType represents a validated TEE capability identifier. The provider determines the actual TEE technology (AMD SEV-SNP or Intel TDX) at deployment time based on node capabilities.

const (
	TEETypeNone   TEEType = ""
	TEETypeCPU    TEEType = "cpu"
	TEETypeCPUGPU TEEType = "cpu-gpu"
)

func ParseTEEType added in v0.16.0

func ParseTEEType(s string) (TEEType, error)

ParseTEEType validates a raw string and returns the corresponding TEEType. Returns TEETypeNone for empty strings. Returns an error for unknown values.

func (TEEType) IsCC added in v0.16.0

func (t TEEType) IsCC() bool

IsCC returns true if this TEE type represents a confidential compute workload.

func (TEEType) IsGPU added in v0.16.0

func (t TEEType) IsGPU() bool

IsGPU returns true if this TEE type requires GPU confidential compute.

Directories

Path Synopsis
clients
ip

Jump to

Keyboard shortcuts

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