controllers

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 67 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIChainIndexKey               = "metadata.apichain"
	LLMChainIndexKey               = "metadata.llmchain"
	RetrievalQAChainIndexKey       = "metadata.retrievalqachain"
	KnowledgebaseIndexKey          = "metadata.knowledgebase"
	LLMIndexKey                    = "metadata.llm"
	PromptIndexKey                 = "metadata.prompt"
	KnowledgebaseRetrieverIndexKey = "metadata.knowledgebaseretriever"
	RerankRetrieverIndexKey        = "metadata.rerankretriever"
	MultiQueryRetrieverIndexKey    = "metadata.multiqueryretriever"
	AgentIndexKey                  = "metadata.agent"
	DocumentLoaderIndexKey         = "metadata.documentloader"
)
View Source
const (
	EmbedderIndexKey    = "metadata.embedder"
	VectorStoreIndexKey = "metadata.vectorstore"
)
View Source
const (
	BucketNotEmpty = "The bucket you tried to delete is not empty"
	BucketNotExist = "The specified bucket does not exist"

	// this is the name of a configmap under the same namespace as operator. the key of the data field is the name of each namespace not to be handled.
	SkipNamespaceConfigMap = "skip-namespaces"
)

Variables

This section is empty.

Functions

func MigrateAppCategory deprecated added in v0.2.2

func MigrateAppCategory(app *arcadiav1alpha1.Application) bool

MigrateAppCategory Migrate the application categories information in annotations to labels to support selection through labels.

Deprecated: The function will be removed in 0.3.

Types

type ApplicationReconciler

type ApplicationReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

ApplicationReconciler reconciles an Application object

func (*ApplicationReconciler) Reconcile

func (r *ApplicationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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. For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile

func (*ApplicationReconciler) SetupWithManager

func (r *ApplicationReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type DatasetReconciler

type DatasetReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

DatasetReconciler reconciles a Dataset object

func (*DatasetReconciler) Reconcile

func (r *DatasetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Dataset 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.12.2/pkg/reconcile

func (*DatasetReconciler) SetupWithManager

func (r *DatasetReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type DatasourceReconciler

type DatasourceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

DatasourceReconciler reconciles a Datasource object

func (*DatasourceReconciler) Checkdatasource

func (r *DatasourceReconciler) Checkdatasource(ctx context.Context, logger logr.Logger, instance *arcadiav1alpha1.Datasource) error

Checkdatasource to update status

func (*DatasourceReconciler) Initialize

func (r *DatasourceReconciler) Initialize(ctx context.Context, logger logr.Logger, instance *arcadiav1alpha1.Datasource) (update bool, err error)

func (*DatasourceReconciler) Reconcile

func (r *DatasourceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Datasource 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.14.1/pkg/reconcile

func (*DatasourceReconciler) RemoveDatasource

func (r *DatasourceReconciler) RemoveDatasource(logger logr.Logger, instance *arcadiav1alpha1.Datasource)

func (*DatasourceReconciler) SetupWithManager

func (r *DatasourceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*DatasourceReconciler) UpdateStatus

func (r *DatasourceReconciler) UpdateStatus(ctx context.Context, instance *arcadiav1alpha1.Datasource, err error) error

UpdateStatus upon error

type Dependency

type Dependency struct {
	IndexName   string
	GroupPrefix string
	Kind        string
}

type EmbedderReconciler

type EmbedderReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

EmbedderReconciler reconciles a Embedder object

func (*EmbedderReconciler) CheckEmbedder

func (r *EmbedderReconciler) CheckEmbedder(ctx context.Context, logger logr.Logger, instance *arcadiav1alpha1.Embedder) error

func (*EmbedderReconciler) Reconcile

func (r *EmbedderReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Embedder 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.14.4/pkg/reconcile

func (*EmbedderReconciler) SetupWithManager

func (r *EmbedderReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*EmbedderReconciler) UpdateStatus

func (r *EmbedderReconciler) UpdateStatus(ctx context.Context, instance *arcadiav1alpha1.Embedder, t interface{}, err error) error

type FinalizersChangedPredicate

type FinalizersChangedPredicate struct {
	predicate.Funcs
}

FinalizersChangedPredicate implements an update predicate function on Finalizers change.

func (FinalizersChangedPredicate) Update

Update implements default UpdateEvent filter for validating generation change.

type KnowledgeBaseReconciler

type KnowledgeBaseReconciler struct {
	client.Client
	Scheme                *runtime.Scheme
	HasHandledSuccessPath map[string]bool

	ReadyMap map[string]bool
	// contains filtered or unexported fields
}

KnowledgeBaseReconciler reconciles a KnowledgeBase object

func (*KnowledgeBaseReconciler) Reconcile

func (r *KnowledgeBaseReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err 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.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.12.2/pkg/reconcile

func (*KnowledgeBaseReconciler) SetupWithManager

func (r *KnowledgeBaseReconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type LLMReconciler

type LLMReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

LLMReconciler reconciles a LLM object

func (*LLMReconciler) CheckLLM

func (r *LLMReconciler) CheckLLM(ctx context.Context, logger logr.Logger, instance *arcadiav1alpha1.LLM) error

CheckLLM updates new LLM instance.

func (*LLMReconciler) Reconcile

func (r *LLMReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 LLM 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.12.2/pkg/reconcile

func (*LLMReconciler) SetupWithManager

func (r *LLMReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*LLMReconciler) UpdateStatus

func (r *LLMReconciler) UpdateStatus(ctx context.Context, instance *arcadiav1alpha1.LLM, t interface{}, err error) error

type ModelReconciler

type ModelReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

ModelReconciler reconciles a Model object

func (*ModelReconciler) CheckModel

func (r *ModelReconciler) CheckModel(ctx context.Context, logger logr.Logger, instance *arcadiav1alpha1.Model) error

CheckModel to update status

func (*ModelReconciler) Initialize

func (r *ModelReconciler) Initialize(ctx context.Context, logger logr.Logger, instance *arcadiav1alpha1.Model) (update bool, err error)

func (*ModelReconciler) Reconcile

func (r *ModelReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Model 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.12.2/pkg/reconcile

func (*ModelReconciler) RemoveModel

func (r *ModelReconciler) RemoveModel(ctx context.Context, logger logr.Logger, instance *arcadiav1alpha1.Model) error

Remove model files from storage

func (*ModelReconciler) SetupWithManager

func (r *ModelReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*ModelReconciler) UpdateStatus

func (r *ModelReconciler) UpdateStatus(ctx context.Context, instance *arcadiav1alpha1.Model, err error) error

UpdateStatus upon error

type NamespaceReconciler

type NamespaceReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

func (*NamespaceReconciler) InstallStreamlitTool

func (r *NamespaceReconciler) InstallStreamlitTool(ctx context.Context, logger logr.Logger, instance *corev1.Namespace) error

InstallStreamlitTool to install the required resource of streamlit

func (*NamespaceReconciler) Reconcile

func (r *NamespaceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Dataset 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.12.2/pkg/reconcile

func (*NamespaceReconciler) SetupWithManager

func (r *NamespaceReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*NamespaceReconciler) UninstallStreamlitTool

func (r *NamespaceReconciler) UninstallStreamlitTool(ctx context.Context, logger logr.Logger, instance *corev1.Namespace) error

UninstallStreamlitTool to remove resources of streamlit

type PromptPredicates

type PromptPredicates struct {
	predicate.Funcs
}

func (PromptPredicates) Create

func (p PromptPredicates) Create(ce event.CreateEvent) bool

func (PromptPredicates) Update

func (p PromptPredicates) Update(ue event.UpdateEvent) bool

type PromptReconciler

type PromptReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

PromptReconciler reconciles a Prompt object

func (*PromptReconciler) CallLLM

func (r *PromptReconciler) CallLLM(ctx context.Context, logger logr.Logger, prompt *arcadiav1alpha1.Prompt) error

func (*PromptReconciler) Reconcile

func (r *PromptReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 Prompt 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.12.2/pkg/reconcile

func (*PromptReconciler) SetupWithManager

func (r *PromptReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

func (*PromptReconciler) UpdateStatus

func (r *PromptReconciler) UpdateStatus(ctx context.Context, prompt *arcadiav1alpha1.Prompt, response llms.Response, err error) error

type VectorStoreReconciler

type VectorStoreReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

VectorStoreReconciler reconciles a VectorStore object

func (*VectorStoreReconciler) CheckVectorStore

func (r *VectorStoreReconciler) CheckVectorStore(ctx context.Context, log logr.Logger, vs *arcadiav1alpha1.VectorStore) (err error)

func (*VectorStoreReconciler) Reconcile

func (r *VectorStoreReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, 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 VectorStore 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.12.2/pkg/reconcile

func (*VectorStoreReconciler) SetupWithManager

func (r *VectorStoreReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type VersionedDatasetReconciler

type VersionedDatasetReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

VersionedDatasetReconciler reconciles a VersionedDataset object

func (*VersionedDatasetReconciler) Reconcile

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 VersionedDataset 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.12.2/pkg/reconcile

func (*VersionedDatasetReconciler) SetupWithManager

func (r *VersionedDatasetReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

type WorkerReconciler

type WorkerReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

WorkerReconciler reconciles a Worker object

func (*WorkerReconciler) Reconcile

func (r *WorkerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err 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 Worker 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.12.2/pkg/reconcile

func (*WorkerReconciler) SetupWithManager

func (r *WorkerReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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