v1alpha1

package
v0.999.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the v1alpha1 API group +kubebuilder:object:generate=true +groupName=llamastack.io

Index

Constants

View Source
const (
	// DefaultContainerName is the default name for the container
	DefaultContainerName = "llama-stack"
	// DefaultServerPort is the default port for the server
	DefaultServerPort int32 = 8321
	// DefaultServicePortName is the default name for the service port
	DefaultServicePortName = "http"
	// DefaultLabelKey is the default key for labels
	DefaultLabelKey = "app"
	// DefaultLabelValue is the default value for labels
	DefaultLabelValue = "llama-stack"
	// DefaultMountPath is the default mount path for storage
	DefaultMountPath = "/.llama"
	// LlamaStackDistributionKind is the kind name for LlamaStackDistribution resources
	LlamaStackDistributionKind = "LlamaStackDistribution"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects.
	GroupVersion = schema.GroupVersion{Group: "llamastack.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var DefaultStorageSize = resource.MustParse("10Gi")

DefaultStorageSize is the default size for persistent storage

Functions

This section is empty.

Types

type CABundleConfig

type CABundleConfig struct {
	// ConfigMapName is the name of the ConfigMap containing CA bundle certificates
	ConfigMapName string `json:"configMapName"`
	// ConfigMapNamespace is the namespace of the ConfigMap (defaults to the same namespace as the CR)
	// +optional
	ConfigMapNamespace string `json:"configMapNamespace,omitempty"`
	// ConfigMapKeys specifies multiple keys within the ConfigMap containing CA bundle data
	// All certificates from these keys will be concatenated into a single CA bundle file
	// If not specified, defaults to [DefaultCABundleKey]
	// +optional
	// +kubebuilder:validation:MaxItems=50
	// +kubebuilder:validation:Items:Pattern="^[a-zA-Z0-9]([a-zA-Z0-9\\-_.]*[a-zA-Z0-9])?$"
	// +kubebuilder:validation:Items:MaxLength=253
	ConfigMapKeys []string `json:"configMapKeys,omitempty"`
}

CABundleConfig defines the CA bundle configuration for custom certificates

func (*CABundleConfig) DeepCopy

func (in *CABundleConfig) DeepCopy() *CABundleConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CABundleConfig.

func (*CABundleConfig) DeepCopyInto

func (in *CABundleConfig) DeepCopyInto(out *CABundleConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ContainerSpec

type ContainerSpec struct {
	// +kubebuilder:default:="llama-stack"
	Name      string                      `json:"name,omitempty"` // Optional, defaults to "llama-stack"
	Port      int32                       `json:"port,omitempty"` // Defaults to 8321 if unset
	Resources corev1.ResourceRequirements `json:"resources,omitempty"`
	Env       []corev1.EnvVar             `json:"env,omitempty"` // Runtime env vars (e.g., INFERENCE_MODEL)
	Command   []string                    `json:"command,omitempty"`
	Args      []string                    `json:"args,omitempty"`
}

ContainerSpec defines the llama-stack server container configuration.

func (*ContainerSpec) DeepCopy

func (in *ContainerSpec) DeepCopy() *ContainerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerSpec.

func (*ContainerSpec) DeepCopyInto

func (in *ContainerSpec) DeepCopyInto(out *ContainerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DistributionConfig

type DistributionConfig struct {
	// ActiveDistribution shows which distribution is currently being used
	ActiveDistribution string         `json:"activeDistribution,omitempty"`
	Providers          []ProviderInfo `json:"providers,omitempty"`
	// AvailableDistributions lists all available distributions and their images
	AvailableDistributions map[string]string `json:"availableDistributions,omitempty"`
}

DistributionConfig represents the configuration information from the providers endpoint.

func (*DistributionConfig) DeepCopy

func (in *DistributionConfig) DeepCopy() *DistributionConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionConfig.

func (*DistributionConfig) DeepCopyInto

func (in *DistributionConfig) DeepCopyInto(out *DistributionConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DistributionPhase

type DistributionPhase string

LlamaStackDistributionPhase represents the current phase of the LlamaStackDistribution +kubebuilder:validation:Enum=Pending;Initializing;Ready;Failed;Terminating

const (
	// LlamaStackDistributionPhasePending indicates that the distribution is pending initialization
	LlamaStackDistributionPhasePending DistributionPhase = "Pending"
	// LlamaStackDistributionPhaseInitializing indicates that the distribution is being initialized
	LlamaStackDistributionPhaseInitializing DistributionPhase = "Initializing"
	// LlamaStackDistributionPhaseReady indicates that the distribution is ready to use
	LlamaStackDistributionPhaseReady DistributionPhase = "Ready"
	// LlamaStackDistributionPhaseFailed indicates that the distribution has failed
	LlamaStackDistributionPhaseFailed DistributionPhase = "Failed"
	// LlamaStackDistributionPhaseTerminating indicates that the distribution is being terminated
	LlamaStackDistributionPhaseTerminating DistributionPhase = "Terminating"
)

type DistributionType

type DistributionType struct {
	// Name is the distribution name that maps to supported distributions.
	// +optional
	Name string `json:"name,omitempty"`
	// Image is the direct container image reference to use
	// +optional
	Image string `json:"image,omitempty"`
}

DistributionType defines the distribution configuration for llama-stack. +kubebuilder:validation:XValidation:rule="!(has(self.name) && has(self.image))",message="Only one of name or image can be specified"

func (*DistributionType) DeepCopy

func (in *DistributionType) DeepCopy() *DistributionType

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DistributionType.

func (*DistributionType) DeepCopyInto

func (in *DistributionType) DeepCopyInto(out *DistributionType)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LlamaStackDistribution

type LlamaStackDistribution struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   LlamaStackDistributionSpec   `json:"spec"`
	Status LlamaStackDistributionStatus `json:"status,omitempty"`
}

func (*LlamaStackDistribution) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LlamaStackDistribution.

func (*LlamaStackDistribution) DeepCopyInto

func (in *LlamaStackDistribution) DeepCopyInto(out *LlamaStackDistribution)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LlamaStackDistribution) DeepCopyObject

func (in *LlamaStackDistribution) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*LlamaStackDistribution) HasPorts

func (r *LlamaStackDistribution) HasPorts() bool

HasPorts checks if the container spec defines a port.

type LlamaStackDistributionList

type LlamaStackDistributionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []LlamaStackDistribution `json:"items"`
}

LlamaStackDistributionList contains a list of LlamaStackDistribution.

func (*LlamaStackDistributionList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LlamaStackDistributionList.

func (*LlamaStackDistributionList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*LlamaStackDistributionList) DeepCopyObject

func (in *LlamaStackDistributionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type LlamaStackDistributionSpec

type LlamaStackDistributionSpec struct {
	// +kubebuilder:default:=1
	Replicas int32      `json:"replicas,omitempty"`
	Server   ServerSpec `json:"server"`
}

LlamaStackDistributionSpec defines the desired state of LlamaStackDistribution.

func (*LlamaStackDistributionSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LlamaStackDistributionSpec.

func (*LlamaStackDistributionSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type LlamaStackDistributionStatus

type LlamaStackDistributionStatus struct {
	// Phase represents the current phase of the distribution
	Phase DistributionPhase `json:"phase,omitempty"`
	// Version contains version information for both operator and deployment
	Version VersionInfo `json:"version,omitempty"`
	// DistributionConfig contains the configuration information from the providers endpoint
	DistributionConfig DistributionConfig `json:"distributionConfig,omitempty"`
	// Conditions represent the latest available observations of the distribution's current state
	Conditions []metav1.Condition `json:"conditions,omitempty"`
	// AvailableReplicas is the number of available replicas
	AvailableReplicas int32 `json:"availableReplicas,omitempty"`
	// ServiceURL is the internal Kubernetes service URL where the distribution is exposed
	ServiceURL string `json:"serviceURL,omitempty"`
}

LlamaStackDistributionStatus defines the observed state of LlamaStackDistribution.

func (*LlamaStackDistributionStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LlamaStackDistributionStatus.

func (*LlamaStackDistributionStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PodOverrides

type PodOverrides struct {
	// ServiceAccountName allows users to specify their own ServiceAccount
	// If not specified, the operator will use the default ServiceAccount
	// +optional
	ServiceAccountName string               `json:"serviceAccountName,omitempty"`
	Volumes            []corev1.Volume      `json:"volumes,omitempty"`
	VolumeMounts       []corev1.VolumeMount `json:"volumeMounts,omitempty"`
}

PodOverrides allows advanced pod-level customization.

func (*PodOverrides) DeepCopy

func (in *PodOverrides) DeepCopy() *PodOverrides

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodOverrides.

func (*PodOverrides) DeepCopyInto

func (in *PodOverrides) DeepCopyInto(out *PodOverrides)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProviderHealthStatus

type ProviderHealthStatus struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

HealthStatus represents the health status of a provider

func (*ProviderHealthStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderHealthStatus.

func (*ProviderHealthStatus) DeepCopyInto

func (in *ProviderHealthStatus) DeepCopyInto(out *ProviderHealthStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProviderInfo

type ProviderInfo struct {
	API          string               `json:"api"`
	ProviderID   string               `json:"provider_id"`
	ProviderType string               `json:"provider_type"`
	Config       apiextensionsv1.JSON `json:"config"`
	Health       ProviderHealthStatus `json:"health"`
}

ProviderInfo represents a single provider from the providers endpoint.

func (*ProviderInfo) DeepCopy

func (in *ProviderInfo) DeepCopy() *ProviderInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderInfo.

func (*ProviderInfo) DeepCopyInto

func (in *ProviderInfo) DeepCopyInto(out *ProviderInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ServerSpec

type ServerSpec struct {
	Distribution  DistributionType `json:"distribution"`
	ContainerSpec ContainerSpec    `json:"containerSpec,omitempty"`
	PodOverrides  *PodOverrides    `json:"podOverrides,omitempty"` // Optional pod-level overrides
	// Storage defines the persistent storage configuration
	// +optional
	Storage *StorageSpec `json:"storage,omitempty"`
	// UserConfig defines the user configuration for the llama-stack server
	// +optional
	UserConfig *UserConfigSpec `json:"userConfig,omitempty"`
	// TLSConfig defines the TLS configuration for the llama-stack server
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
}

ServerSpec defines the desired state of llama server.

func (*ServerSpec) DeepCopy

func (in *ServerSpec) DeepCopy() *ServerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServerSpec.

func (*ServerSpec) DeepCopyInto

func (in *ServerSpec) DeepCopyInto(out *ServerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type StorageSpec

type StorageSpec struct {
	// Size is the size of the persistent volume claim created for holding persistent data of the llama-stack server
	Size *resource.Quantity `json:"size,omitempty"`
	// MountPath is the path where the storage will be mounted in the container
	MountPath string `json:"mountPath,omitempty"`
}

StorageSpec defines the persistent storage configuration

func (*StorageSpec) DeepCopy

func (in *StorageSpec) DeepCopy() *StorageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.

func (*StorageSpec) DeepCopyInto

func (in *StorageSpec) DeepCopyInto(out *StorageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TLSConfig

type TLSConfig struct {
	// CABundle defines the CA bundle configuration for custom certificates
	// +optional
	CABundle *CABundleConfig `json:"caBundle,omitempty"`
}

TLSConfig defines the TLS configuration for the llama-stack server

func (*TLSConfig) DeepCopy

func (in *TLSConfig) DeepCopy() *TLSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.

func (*TLSConfig) DeepCopyInto

func (in *TLSConfig) DeepCopyInto(out *TLSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type UserConfigSpec

type UserConfigSpec struct {
	// ConfigMapName is the name of the ConfigMap containing user configuration
	ConfigMapName string `json:"configMapName"`
	// ConfigMapNamespace is the namespace of the ConfigMap (defaults to the same namespace as the CR)
	// +optional
	ConfigMapNamespace string `json:"configMapNamespace,omitempty"`
}

func (*UserConfigSpec) DeepCopy

func (in *UserConfigSpec) DeepCopy() *UserConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserConfigSpec.

func (*UserConfigSpec) DeepCopyInto

func (in *UserConfigSpec) DeepCopyInto(out *UserConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type VersionInfo

type VersionInfo struct {
	// OperatorVersion is the version of the operator managing this distribution
	OperatorVersion string `json:"operatorVersion,omitempty"`
	// LlamaStackServerVersion is the version of the LlamaStack server
	LlamaStackServerVersion string `json:"llamaStackServerVersion,omitempty"`
	// LastUpdated represents when the version information was last updated
	LastUpdated metav1.Time `json:"lastUpdated,omitempty"`
}

VersionInfo contains version-related information

func (*VersionInfo) DeepCopy

func (in *VersionInfo) DeepCopy() *VersionInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionInfo.

func (*VersionInfo) DeepCopyInto

func (in *VersionInfo) DeepCopyInto(out *VersionInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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