Skip to content

Commit 34d4f23

Browse files
Merge pull request #109 from lpiwowar/lpiwowar/default-logging-dataverse
Fix default log level for Dataverse
2 parents 45676d8 + b14ed7d commit 34d4f23

6 files changed

Lines changed: 10 additions & 10 deletions

api/v1beta1/openstacklightspeed_types.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ type OpenStackLightspeedSpec struct {
8989
// LoggingConfig defines logging configuration for OpenStackLightspeed components
9090
type LoggingConfig struct {
9191
// +kubebuilder:validation:Optional
92+
// +kubebuilder:default="all=info"
9293
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="OGX Log Level"
93-
// Log level configuration for the OGX/llama-stack container. Supports standard levels (INFO, DEBUG) or fine-grained control using format "component=level,component=level" (e.g., "core=debug,providers=info"). Defaults to "all=info" if empty.
94+
// Log level configuration for the OGX/llama-stack container. Supports standard levels (INFO, DEBUG) or fine-grained control using format "component=level,component=level" (e.g., "core=debug,providers=info").
9495
OGXLogLevel string `json:"ogxLogLevel,omitempty"`
9596

9697
// +kubebuilder:validation:Optional
@@ -162,8 +163,9 @@ type OpenStackLightspeedCore struct {
162163
TranscriptsDisabled bool `json:"transcriptsDisabled,omitempty"`
163164

164165
// +kubebuilder:validation:Optional
166+
// +kubebuilder:default={}
165167
// Logging configuration for OpenStackLightspeed components
166-
Logging LoggingConfig `json:"logging,omitempty"`
168+
Logging LoggingConfig `json:"logging"`
167169
}
168170

169171
// OpenStackLightspeedStatus defines the observed state of OpenStackLightspeed

bundle/manifests/lightspeed.openstack.org_openstacklightspeeds.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ spec:
108108
description: Project ID for LLM providers that require it (e.g., WatsonX)
109109
type: string
110110
logging:
111+
default: {}
111112
description: Logging configuration for OpenStackLightspeed components
112113
properties:
113114
dataverseExporterLogLevel:
@@ -135,10 +136,10 @@ spec:
135136
- CRITICAL
136137
type: string
137138
ogxLogLevel:
139+
default: all=info
138140
description: Log level configuration for the OGX/llama-stack container.
139141
Supports standard levels (INFO, DEBUG) or fine-grained control
140142
using format "component=level,component=level" (e.g., "core=debug,providers=info").
141-
Defaults to "all=info" if empty.
142143
type: string
143144
type: object
144145
maxTokensForResponse:

bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ spec:
138138
path: logging.lightspeedStackLogLevel
139139
- description: Log level configuration for the OGX/llama-stack container. Supports
140140
standard levels (INFO, DEBUG) or fine-grained control using format "component=level,component=level"
141-
(e.g., "core=debug,providers=info"). Defaults to "all=info" if empty.
141+
(e.g., "core=debug,providers=info").
142142
displayName: OGX Log Level
143143
path: logging.ogxLogLevel
144144
- description: Name of the model to use at the API endpoint provided in LLMEndpoint

config/crd/bases/lightspeed.openstack.org_openstacklightspeeds.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ spec:
108108
description: Project ID for LLM providers that require it (e.g., WatsonX)
109109
type: string
110110
logging:
111+
default: {}
111112
description: Logging configuration for OpenStackLightspeed components
112113
properties:
113114
dataverseExporterLogLevel:
@@ -135,10 +136,10 @@ spec:
135136
- CRITICAL
136137
type: string
137138
ogxLogLevel:
139+
default: all=info
138140
description: Log level configuration for the OGX/llama-stack container.
139141
Supports standard levels (INFO, DEBUG) or fine-grained control
140142
using format "component=level,component=level" (e.g., "core=debug,providers=info").
141-
Defaults to "all=info" if empty.
142143
type: string
143144
type: object
144145
maxTokensForResponse:

config/manifests/bases/openstack-lightspeed-operator.clusterserviceversion.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ spec:
115115
path: logging.lightspeedStackLogLevel
116116
- description: Log level configuration for the OGX/llama-stack container. Supports
117117
standard levels (INFO, DEBUG) or fine-grained control using format "component=level,component=level"
118-
(e.g., "core=debug,providers=info"). Defaults to "all=info" if empty.
118+
(e.g., "core=debug,providers=info").
119119
displayName: OGX Log Level
120120
path: logging.ogxLogLevel
121121
- description: Name of the model to use at the API endpoint provided in LLMEndpoint

internal/controller/lcore_deployment.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -606,9 +606,6 @@ func buildLightspeedStackReadinessProbe() *corev1.Probe {
606606
// Defaults to "all=info" if not specified.
607607
func getOGXLogLevel(instance *apiv1beta1.OpenStackLightspeed) string {
608608
logLevel := instance.Spec.Logging.OGXLogLevel
609-
if logLevel == "" {
610-
return "all=info"
611-
}
612609

613610
// If it's a simple level (INFO, DEBUG, etc.), convert to "all=<level>" format
614611
// Otherwise, pass through for fine-grained control (e.g., "core=debug,providers=info")
@@ -618,7 +615,6 @@ func getOGXLogLevel(instance *apiv1beta1.OpenStackLightspeed) string {
618615
return fmt.Sprintf("all=%s", strings.ToLower(logLevel))
619616
}
620617

621-
// Pass through as-is for fine-grained control
622618
return logLevel
623619
}
624620

0 commit comments

Comments
 (0)