Documentation
¶
Index ¶
Constants ¶
const ( CPUResourceName = "cpu" MemoryResourceName = "memory" StorageResourceName = "storage" EphemeralStorageResourceName = "ephemeral-storage" )
const ( MetadataContextSize = "ai.contrib.fluxcd.io/context-size" MetadataFamily = "ai.contrib.fluxcd.io/family" MetadataFormat = "ai.contrib.fluxcd.io/format" MetadataMemoryRequired = "ai.contrib.fluxcd.io/memory-required" MetadataModelDescription = "ai.contrib.fluxcd.io/model-description" MetadataModelLevel = "ai.contrib.fluxcd.io/model-level" MetadataPromptTemplate = "ai.contrib.fluxcd.io/prompt-template" MetadataQuantization = "ai.contrib.fluxcd.io/quantization" MetadataSizeOnDisk = "ai.contrib.fluxcd.io/size-on-disk" MetadataStopWords = "ai.contrib.fluxcd.io/stop-words" )
const ( SizeOnDiskSafetyFactor = 1.20 MemorySafetyFactor = 1.00 )
const ( EnvVarContextSize = "LM_CTRL_CONTEXT_SIZE" EnvVarFamily = "LM_CTRL_FAMILY" EnvVarFormat = "LM_CTRL_FORMAT" EnvVarModelDescription = "LM_CTRL_MODEL_DESCRIPTION" EnvVarModelLevel = "LM_CTRL_MODEL_LEVEL" EnvVarModelName = "LM_CTRL_MODEL_NAME" EnvVarPromptTemplate = "LM_CTRL_PROMPT_TEMPLATE" EnvVarQuantization = "LM_CTRL_QUANTIZATION" EnvVarStopWords = "LM_CTRL_STOP_WORDS" )
const LanguageModelConfigMapSuffix = "-lmcm"
Variables ¶
This section is empty.
Functions ¶
func GenerateConfigMap ¶
func GenerateConfigMap(lm *aiv1a1.LanguageModel) (*corev1.ConfigMap, error)
func HasChanged ¶
HasChanged evaluates the given action and returns true if the action type matches a resource mutation or deletion.
Types ¶
type LanguageModelReconciler ¶
type LanguageModelReconciler struct {
client.Client
Scheme *runtime.Scheme
kuberecorder.EventRecorder
runtimeCtrl.Metrics
ControllerName string
StatusPoller *polling.StatusPoller
PollingOpts polling.Options
DefaultServiceAccount string
KubeConfigOpts runtimeClient.KubeConfigOptions
ConcurrentSSA int
NoCrossNamespaceRefs bool
FailFast bool
// contains filtered or unexported fields
}
LanguageModelReconciler reconciles a LanguageModel object
func (*LanguageModelReconciler) Reconcile ¶
func (r *LanguageModelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, retErr error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the LanguageModel object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.15.0/pkg/reconcile
func (*LanguageModelReconciler) SetupWithManager ¶
func (r *LanguageModelReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager, opts LanguageModelReconcilerOptions) error
SetupWithManager sets up the controller with the Manager.
type LanguageModelReconcilerOptions ¶
type LanguageModelReconcilerOptions struct {
HTTPRetry int
RateLimiter ratelimiter.RateLimiter
}
LanguageModelReconcilerOptions contains options for the LanguageModelReconciler.
type SourceRevisionChangePredicate ¶
func (SourceRevisionChangePredicate) Update ¶
func (SourceRevisionChangePredicate) Update(e event.UpdateEvent) bool