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
2 changes: 2 additions & 0 deletions api/v1alpha1/olsconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,10 @@ type ProviderSpec struct {
// UserDataCollectionSpec defines how we collect user data.
type UserDataCollectionSpec struct {
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Do Not Collect User Feedback"
// When enabled, user feedback will be collected. When either feedback or transcripts are enabled, config collection is also automatically enabled.
FeedbackDisabled bool `json:"feedbackDisabled,omitempty"`
// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Do Not Collect Transcripts"
// When enabled, conversation transcripts will be collected. When either feedback or transcripts are enabled, config collection is also automatically enabled.
TranscriptsDisabled bool `json:"transcriptsDisabled,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion bundle.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=lightspeed-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.bundle.channel.default.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.33.0
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.36.1
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4

Expand Down
18 changes: 12 additions & 6 deletions bundle/manifests/lightspeed-operator.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ metadata:
]
capabilities: Basic Install
console.openshift.io/operator-monitoring-default: "true"
createdAt: "2025-08-13T09:31:54Z"
createdAt: "2025-08-21T15:05:57Z"
features.operators.openshift.io/cnf: "false"
features.operators.openshift.io/cni: "false"
features.operators.openshift.io/csi: "false"
Expand All @@ -52,7 +52,7 @@ metadata:
operatorframework.io/cluster-monitoring: "true"
operatorframework.io/suggested-namespace: openshift-lightspeed
operators.openshift.io/valid-subscription: '["OpenShift Container Platform", "OpenShift Platform Plus", "OpenShift Kubernetes Engine", "OpenShift Virtualization Engine"]'
operators.operatorframework.io/builder: operator-sdk-v1.33.0
operators.operatorframework.io/builder: operator-sdk-v1.36.1
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
repository: https://github.com/openshift/lightspeed-operator
name: lightspeed-operator.v1.0.3
Expand Down Expand Up @@ -81,7 +81,9 @@ spec:
- description: The name of the secret object that stores API provider credentials
displayName: Credential Secret
path: llm.providers[0].credentialsSecretRef
- description: 'Feature Gates holds list of features to be enabled explicitly, otherwise they are disabled by default. possible values: MCPServer'
- description: |-
Feature Gates holds list of features to be enabled explicitly, otherwise they are disabled by default.
possible values: MCPServer
displayName: Feature Gates
path: featureGates
- displayName: LLM Settings
Expand Down Expand Up @@ -274,7 +276,9 @@ spec:
- description: The configmap holding proxy CA certificate
displayName: Proxy CA Certificate
path: ols.proxyConfig.proxyCACertificate
- description: Proxy URL, e.g. https://proxy.example.com:8080 If not specified, the cluster wide proxy will be used, though env var "https_proxy".
- description: |-
Proxy URL, e.g. https://proxy.example.com:8080
If not specified, the cluster wide proxy will be used, though env var "https_proxy".
displayName: Proxy URL
path: ols.proxyConfig.proxyURL
- description: Query filters
Expand Down Expand Up @@ -356,9 +360,11 @@ spec:
- description: User data collection switches
displayName: User Data Collection
path: ols.userDataCollection
- displayName: Do Not Collect User Feedback
- description: When enabled, user feedback will be collected. When either feedback or transcripts are enabled, config collection is also automatically enabled.
displayName: Do Not Collect User Feedback
path: ols.userDataCollection.feedbackDisabled
- displayName: Do Not Collect Transcripts
- description: When enabled, conversation transcripts will be collected. When either feedback or transcripts are enabled, config collection is also automatically enabled.
displayName: Do Not Collect Transcripts
path: ols.userDataCollection.transcriptsDisabled
- displayName: OLS Data Collector Settings
path: olsDataCollector
Expand Down
6 changes: 6 additions & 0 deletions bundle/manifests/ols.openshift.io_olsconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1270,8 +1270,14 @@ spec:
description: User data collection switches
properties:
feedbackDisabled:
description: When enabled, user feedback will be collected.
When either feedback or transcripts are enabled, config
collection is also automatically enabled.
type: boolean
transcriptsDisabled:
description: When enabled, conversation transcripts will be
collected. When either feedback or transcripts are enabled,
config collection is also automatically enabled.
type: boolean
type: object
required:
Expand Down
2 changes: 1 addition & 1 deletion bundle/metadata/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ annotations:
operators.operatorframework.io.bundle.package.v1: lightspeed-operator
operators.operatorframework.io.bundle.channels.v1: alpha
operators.operatorframework.io.bundle.channel.default.v1: alpha
operators.operatorframework.io.metrics.builder: operator-sdk-v1.33.0
operators.operatorframework.io.metrics.builder: operator-sdk-v1.36.1
operators.operatorframework.io.metrics.mediatype.v1: metrics+v1
operators.operatorframework.io.metrics.project_layout: go.kubebuilder.io/v4
# Annotations for testing.
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/ols.openshift.io_olsconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1270,8 +1270,14 @@ spec:
description: User data collection switches
properties:
feedbackDisabled:
description: When enabled, user feedback will be collected.
When either feedback or transcripts are enabled, config
collection is also automatically enabled.
type: boolean
transcriptsDisabled:
description: When enabled, conversation transcripts will be
collected. When either feedback or transcripts are enabled,
config collection is also automatically enabled.
type: boolean
type: object
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ spec:
- description: The name of the secret object that stores API provider credentials
displayName: Credential Secret
path: llm.providers[0].credentialsSecretRef
- description: 'Feature Gates holds list of features to be enabled explicitly,
otherwise they are disabled by default. possible values: MCPServer'
- description: |-
Feature Gates holds list of features to be enabled explicitly, otherwise they are disabled by default.
possible values: MCPServer
displayName: Feature Gates
path: featureGates
- displayName: LLM Settings
Expand Down Expand Up @@ -246,8 +247,9 @@ spec:
- description: The configmap holding proxy CA certificate
displayName: Proxy CA Certificate
path: ols.proxyConfig.proxyCACertificate
- description: Proxy URL, e.g. https://proxy.example.com:8080 If not specified,
the cluster wide proxy will be used, though env var "https_proxy".
- description: |-
Proxy URL, e.g. https://proxy.example.com:8080
If not specified, the cluster wide proxy will be used, though env var "https_proxy".
displayName: Proxy URL
path: ols.proxyConfig.proxyURL
- description: Query filters
Expand Down Expand Up @@ -329,9 +331,14 @@ spec:
- description: User data collection switches
displayName: User Data Collection
path: ols.userDataCollection
- displayName: Do Not Collect User Feedback
- description: When enabled, user feedback will be collected. When either feedback
or transcripts are enabled, config collection is also automatically enabled.
displayName: Do Not Collect User Feedback
path: ols.userDataCollection.feedbackDisabled
- displayName: Do Not Collect Transcripts
- description: When enabled, conversation transcripts will be collected. When
either feedback or transcripts are enabled, config collection is also automatically
enabled.
displayName: Do Not Collect Transcripts
path: ols.userDataCollection.transcriptsDisabled
- displayName: OLS Data Collector Settings
path: olsDataCollector
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/ols_app_server_assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ func (r *OLSConfigReconciler) generateOLSConfigMap(ctx context.Context, cr *olsv
FeedbackStorage: "/app-root/ols-user-data/feedback",
TranscriptsDisabled: cr.Spec.OLSConfig.UserDataCollection.TranscriptsDisabled || !dataCollectorEnabled,
TranscriptsStorage: "/app-root/ols-user-data/transcripts",
ConfigDisabled: !dataCollectorEnabled,
ConfigStorage: "/app-root/ols-user-data/config",
},
ProxyConfig: proxyConfig,
}
Expand Down
6 changes: 6 additions & 0 deletions internal/controller/ols_app_server_assets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ var _ = Describe("App server assets", func() {
FeedbackStorage: "/app-root/ols-user-data/feedback",
TranscriptsDisabled: false,
TranscriptsStorage: "/app-root/ols-user-data/transcripts",
ConfigDisabled: false,
ConfigStorage: "/app-root/ols-user-data/config",
},
},
LLMProviders: []ProviderConfig{
Expand Down Expand Up @@ -1303,6 +1305,8 @@ ols_config:
tls_certificate_path: /etc/certs/lightspeed-tls/tls.crt
tls_key_path: /etc/certs/lightspeed-tls/tls.key
user_data_collection:
config_disabled: false
config_storage: /app-root/ols-user-data/config
feedback_disabled: false
feedback_storage: /app-root/ols-user-data/feedback
transcripts_disabled: false
Expand Down Expand Up @@ -1359,6 +1363,8 @@ ols_config:
tls_certificate_path: /etc/certs/lightspeed-tls/tls.crt
tls_key_path: /etc/certs/lightspeed-tls/tls.key
user_data_collection:
config_disabled: true
config_storage: /app-root/ols-user-data/config
feedback_disabled: true
feedback_storage: /app-root/ols-user-data/feedback
transcripts_disabled: true
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/ols_app_server_deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ func (r *OLSConfigReconciler) telemetryEnabled() (bool, error) {

func (r *OLSConfigReconciler) dataCollectorEnabled(cr *olsv1alpha1.OLSConfig) (bool, error) {
// data collector is enabled in OLS configuration
configEnabled := !(cr.Spec.OLSConfig.UserDataCollection.FeedbackDisabled && cr.Spec.OLSConfig.UserDataCollection.TranscriptsDisabled)
configEnabled := !cr.Spec.OLSConfig.UserDataCollection.FeedbackDisabled || !cr.Spec.OLSConfig.UserDataCollection.TranscriptsDisabled
telemetryEnabled, err := r.telemetryEnabled()
if err != nil {
return false, err
Expand Down
2 changes: 2 additions & 0 deletions internal/controller/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ type UserDataCollectionConfig struct {
FeedbackStorage string `json:"feedback_storage,omitempty"`
TranscriptsDisabled bool `json:"transcripts_disabled" default:"false"`
TranscriptsStorage string `json:"transcripts_storage,omitempty"`
ConfigDisabled bool `json:"config_disabled" default:"false"`
ConfigStorage string `json:"config_storage,omitempty"`
}

type UserDataCollectorConfig struct {
Expand Down