provider

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 28 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// KubernetesProviderKind is the canonical provider kind for Kubernetes deployments.
	KubernetesProviderKind = "kubernetes"
	// LegacyKubernetesProviderKind is accepted for existing records and templates
	// created before the provider kind was standardized.
	LegacyKubernetesProviderKind = "k8s-deployment"
)

Variables

This section is empty.

Functions

func ApplyObservedStatus

func ApplyObservedStatus(deployment *pb.Deployment, observed *ObservedStatus) *pb.Deployment

Types

type ClusterClientProvider

type ClusterClientProvider interface {
	KubernetesClientProvider
	ModelClientProvider
}

ClusterClientProvider exposes both clientsets backed by one Kubernetes configuration.

type DeploymentProvider

type DeploymentProvider interface {
	Kind() string
	Validate(ctx context.Context, template *pb.ModelDeploymentTemplate, req *pb.CreateDeploymentRequest) error
	Create(ctx context.Context, template *pb.ModelDeploymentTemplate, servingName string, req *pb.CreateDeploymentRequest) (*pb.Deployment, error)
	Observe(ctx context.Context, deployment *pb.Deployment) (*ObservedStatus, error)
	Update(ctx context.Context, deployment *pb.Deployment) (*pb.Deployment, error)
	Delete(ctx context.Context, deployment *pb.Deployment) error
}

func NewKubernetesDeploymentProvider

func NewKubernetesDeploymentProvider(
	clients KubernetesClientProvider,
	workload config.KubernetesWorkloadConfig,
) DeploymentProvider

type KubernetesClientProvider

type KubernetesClientProvider interface {
	Client() (kubernetes.Interface, string, error)
}

KubernetesClientProvider resolves a Kubernetes client and its workload namespace. Alternate environments can implement this interface without changing deployment lifecycle or resource rendering.

type ModelClientProvider

type ModelClientProvider interface {
	ModelClient() (aibrixclient.Interface, string, error)
}

ModelClientProvider resolves the AIBrix typed client against the same cluster and namespace as the core Kubernetes client.

type ObservedStatus

type ObservedStatus struct {
	Status     string
	Reason     string
	Message    string
	Replicas   string
	ObservedAt int64
}

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry(providers ...DeploymentProvider) *Registry

func (*Registry) Get

func (r *Registry) Get(kind string) (DeploymentProvider, error)

Jump to

Keyboard shortcuts

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