Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ metadata:
}
}
]
capabilities: Basic Install
capabilities: Seamless Upgrades
console.openshift.io/operator-monitoring-default: "true"
createdAt: "2025-12-18T10:30:55Z"
createdAt: "2026-01-28T20:15:15Z"
features.operators.openshift.io/cnf: "false"
features.operators.openshift.io/cni: "false"
features.operators.openshift.io/csi: "false"
Expand Down Expand Up @@ -606,6 +606,7 @@ spec:
- --cert-dir=/etc/tls/private
- --lcore-image=quay.io/lightspeed-core/lightspeed-stack:dev-latest
- --use-lcore=false
- --lcore-server=true
- --service-image=quay.io/openshift-lightspeed/lightspeed-service-api:latest
- --console-image=quay.io/openshift-lightspeed/lightspeed-console-plugin:latest
- --console-image-pf5=quay.io/openshift-lightspeed/lightspeed-console-plugin-pf5:latest
Expand Down
10 changes: 10 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ func main() {
var dataverseExporterImage string
var ocpRagImage string
var useLCore bool
var lcoreServerMode bool
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
Expand All @@ -197,6 +198,7 @@ func main() {
flag.StringVar(&dataverseExporterImage, "dataverse-exporter-image", utils.DataverseExporterImageDefault, "The image of the dataverse exporter container.")
flag.StringVar(&ocpRagImage, "ocp-rag-image", utils.OcpRagImageDefault, "The image with the OCP RAG databases.")
flag.BoolVar(&useLCore, "use-lcore", false, "Use LCore instead of AppServer for the application server deployment.")
flag.BoolVar(&lcoreServerMode, "lcore-server", true, "Use LCore in a server mode.")
opts := zap.Options{
Development: true,
}
Expand All @@ -219,6 +221,13 @@ func main() {
}
setupLog.Info("========================================")
setupLog.Info(">>> BACKEND CONFIGURATION <<<", "backendType", backendType)
if useLCore {
deploymentMode := "server"
if !lcoreServerMode {
deploymentMode = "library"
}
setupLog.Info(">>> LCORE DEPLOYMENT MODE <<<", "mode", deploymentMode)
}
setupLog.Info("========================================")

setupLog.Info("Starting the operator", "metricsAddr", metricsAddr, "probeAddr", probeAddr, "certDir", certDir, "certName", certName, "keyName", keyName, "namespace", namespace)
Expand Down Expand Up @@ -430,6 +439,7 @@ func main() {
DataverseExporterImage: imagesMap["dataverse-exporter-image"],
LightspeedCoreImage: imagesMap["lightspeed-core"],
UseLCore: useLCore,
LCoreServerMode: lcoreServerMode,
Namespace: namespace,
PrometheusAvailable: prometheusAvailable,
},
Expand Down
1 change: 1 addition & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ spec:
- "--cert-dir=/etc/tls/private"
- "--lcore-image=quay.io/lightspeed-core/lightspeed-stack:dev-latest"
- "--use-lcore=false"
- "--lcore-server=true"
image: quay.io/openshift-lightspeed/lightspeed-operator:latest
imagePullPolicy: Always
name: manager
Expand Down
23 changes: 18 additions & 5 deletions internal/controller/lcore/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ func buildLlamaStackYAML(r reconciler.Reconciler, ctx context.Context, cr *olsv1
// LCore Config component builder functions (return maps for maintainability)
// ============================================================================

func buildLCoreServiceConfig(_ reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) map[string]interface{} {
func buildLCoreServiceConfig(r reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) map[string]interface{} {
// Map LogLevel from OLSConfig
// Valid values: DEBUG, INFO, WARNING, ERROR, CRITICAL
// Default to info if not specified
Expand All @@ -693,7 +693,7 @@ func buildLCoreServiceConfig(_ reconciler.Reconciler, cr *olsv1alpha1.OLSConfig)
// color_log: enable colored logs for DEBUG, disable for production (INFO+)
colorLog := logLevel == olsv1alpha1.LogLevelDebug

return map[string]interface{}{
serviceConfig := map[string]interface{}{
"host": "0.0.0.0",
"port": utils.OLSAppServerContainerPort,
"auth_enabled": false,
Expand All @@ -707,14 +707,27 @@ func buildLCoreServiceConfig(_ reconciler.Reconciler, cr *olsv1alpha1.OLSConfig)
"tls_key_path": "/etc/certs/lightspeed-tls/tls.key",
},
}

return serviceConfig
}

func buildLCoreLlamaStackConfig(_ reconciler.Reconciler, _ *olsv1alpha1.OLSConfig) map[string]interface{} {
return map[string]interface{}{
"use_as_library_client": false,
func buildLCoreLlamaStackConfig(r reconciler.Reconciler, _ *olsv1alpha1.OLSConfig) map[string]interface{} {
// Server mode: llama-stack runs as a separate service (container)
// Library mode: llama-stack runs as an embedded library
isLibraryMode := r != nil && !r.GetLCoreServerMode()

llamaStackConfig := map[string]interface{}{
"use_as_library_client": isLibraryMode,
"url": "http://localhost:8321",
"api_key": "xyzzy",
}

// In library mode, add path to llama-stack config file
if isLibraryMode {
llamaStackConfig["library_client_config_path"] = utils.LlamaStackConfigMountPath
}

return llamaStackConfig
}

func buildLCoreUserDataCollectionConfig(_ reconciler.Reconciler, cr *olsv1alpha1.OLSConfig) map[string]interface{} {
Expand Down
Loading