Skip to content
Merged
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
6 changes: 3 additions & 3 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
domain: lightspeed.openstack.org
domain: openstack.org
layout:
- go.kubebuilder.io/v4
plugins:
Expand All @@ -16,8 +16,8 @@ resources:
crdVersion: v1
namespaced: true
controller: true
domain: lightspeed.openstack.org
group: api
domain: openstack.org
group: lightspeed
kind: OpenStackLightspeed
path: github.com/openstack-lightspeed/operator/api/v1beta1
version: v1beta1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ metadata:
}
]
capabilities: Basic Install
createdAt: "2026-01-16T13:55:22Z"
createdAt: "2026-02-03T12:43:44Z"
operatorframework.io/suggested-namespace: openshift-lightspeed
operators.operatorframework.io/builder: operator-sdk-v1.38.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v4
Expand All @@ -35,37 +35,15 @@ spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- kind: OpenStackLightspeed
- description: OpenStackLightspeed is the Schema for the openstacklightspeeds
API
displayName: Open Stack Lightspeed
kind: OpenStackLightspeed
name: openstacklightspeeds.lightspeed.openstack.org
specDescriptors:
- description: URL pointing to the LLM
displayName: LLMEndpoint
path: llmEndpoint
- description: Type of the provider serving the LLM
displayName: LLMEndpointType
displayName: Provider Type
path: llmEndpointType
- description: Name of the model to use at the API endpoint
displayName: ModelName
path: modelName
- description: Secret name containing API token for the LLMEndpoint
displayName: LLMCredentials
path: llmCredentials
x-descriptors:
- urn:alm:descriptor:io.kubernetes:Secret
- description: Configmap name containing a CA Certificates bundle
displayName: TLSCACertBundle
path: tlsCACertBundle
x-descriptors:
- urn:alm:descriptor:io.kubernetes:ConfigMap
- description: MaxTokensForResponse defines the maximum number of tokens to
be used for the response generation
displayName: MaxTokensForResponse
path: maxTokensForResponse
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
statusDescriptors:
- displayName: Conditions
path: conditions
version: v1beta1
description: |-
OpenStack Lightspeed is a generative AI-based virtual assistant for Red Hat OpenStack Services on OpenShift (RHOSO) users which integrates into the OpenShift Lightspeed.
Expand Down Expand Up @@ -187,6 +165,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: RELATED_IMAGE_OPENSTACK_LIGHTSPEED_IMAGE_URL_DEFAULT
value: quay.io/openstack-lightspeed/rag-content:os-docs-2025.2
image: quay.io/openstack-lightspeed/operator:latest
livenessProbe:
httpGet:
Expand Down Expand Up @@ -307,7 +287,11 @@ spec:
- email: Lukas Piwowarski
name: lpiwowar@redhat.com
maturity: alpha
minKubeVersion: 1.31.0
provider:
name: Red Hat
url: https://github.com/openstack-lightspeed/operator
relatedImages:
- image: quay.io/openstack-lightspeed/rag-content:os-docs-2025.2
name: openstack-lightspeed-image-url-default
version: 0.0.1
2 changes: 2 additions & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: RELATED_IMAGE_OPENSTACK_LIGHTSPEED_IMAGE_URL_DEFAULT
value: quay.io/openstack-lightspeed/rag-content:os-docs-2025.2
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,15 @@ spec:
apiservicedefinitions: {}
customresourcedefinitions:
owned:
- kind: OpenStackLightspeed
- description: OpenStackLightspeed is the Schema for the openstacklightspeeds
API
displayName: Open Stack Lightspeed
kind: OpenStackLightspeed
name: openstacklightspeeds.lightspeed.openstack.org
specDescriptors:
- description: URL pointing to the LLM
displayName: LLMEndpoint
path: llmEndpoint
- description: Type of the provider serving the LLM
displayName: LLMEndpointType
displayName: Provider Type
path: llmEndpointType
- description: Name of the model to use at the API endpoint
displayName: ModelName
path: modelName
- description: Secret name containing API token for the LLMEndpoint
displayName: LLMCredentials
path: llmCredentials
x-descriptors:
- urn:alm:descriptor:io.kubernetes:Secret
- description: Configmap name containing a CA Certificates bundle
displayName: TLSCACertBundle
path: tlsCACertBundle
x-descriptors:
- urn:alm:descriptor:io.kubernetes:ConfigMap
- description: MaxTokensForResponse defines the maximum number of tokens to
be used for the response generation
displayName: MaxTokensForResponse
path: maxTokensForResponse
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:advanced
statusDescriptors:
- displayName: Conditions
path: conditions
version: v1beta1
description: |-
OpenStack Lightspeed is a generative AI-based virtual assistant for Red Hat OpenStack Services on OpenShift (RHOSO) users which integrates into the OpenShift Lightspeed.
Expand Down Expand Up @@ -83,6 +61,7 @@ spec:
- email: Lukas Piwowarski
name: lpiwowar@redhat.com
maturity: alpha
minKubeVersion: 1.31.0
provider:
name: Red Hat
url: https://github.com/openstack-lightspeed/operator
Expand Down
66 changes: 66 additions & 0 deletions hack/pullspecs_replaceatron.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash
set -euo pipefail

# Script to update RELATED_IMAGE_ environment variables in ClusterServiceVersion file
# with values from the current bash environment

CSV_FILE="bundle/manifests/openstack-lightspeed-operator.clusterserviceversion.yaml"

# Check if CSV file exists
if [[ ! -f "$CSV_FILE" ]]; then
echo "Error: ClusterServiceVersion file not found at $CSV_FILE"
echo "Please run 'make bundle' first to generate the bundle directory"
exit 1
fi

# Create a backup of the original file
cp "$CSV_FILE" "${CSV_FILE}.backup"

echo "Updating RELATED_IMAGE_ environment variables in $CSV_FILE..."

# Extract all RELATED_IMAGE_ env var names from the CSV file
RELATED_IMAGE_VARS=$(grep -o 'RELATED_IMAGE_[A-Z_]*' "$CSV_FILE" | sort -u)

# Track if any errors occurred
ERRORS=0

# Process each RELATED_IMAGE_ variable
for var_name in $RELATED_IMAGE_VARS; do
# Check if the environment variable exists in the current bash environment
if [[ -n "${!var_name:-}" ]]; then
current_value="${!var_name}"
echo "Updating $var_name with value: $current_value"

# Use sed to replace all occurrences of the current value in the CSV file
# First, we need to get the current value from the CSV file
current_csv_value=$(grep -A1 "name: $var_name" "$CSV_FILE" | grep "value:" | sed 's/.*value: //' | tr -d '"')

if [[ -n "$current_csv_value" ]]; then
# Escape special characters for sed
escaped_current=$(printf '%s\n' "$current_csv_value" | sed 's/[[\.*^$()+?{|]/\\&/g')
escaped_new=$(printf '%s\n' "$current_value" | sed 's/[[\.*^$()+?{|]/\\&/g')

# Replace all occurrences of the current value with the new value
sed -i "s|$escaped_current|$escaped_new|g" "$CSV_FILE"
else
echo "Warning: Could not find current value for $var_name in CSV file"
fi
else
echo "Error: Environment variable $var_name is not set"
ERRORS=$((ERRORS + 1))
fi
done

if [[ $ERRORS -gt 0 ]]; then
echo ""
echo "Error: $ERRORS environment variable(s) were not found"
echo "Please set all required RELATED_IMAGE_ environment variables before running this script"
echo "Restoring original file from backup..."
mv "${CSV_FILE}.backup" "$CSV_FILE"
exit 1
else
echo ""
echo "Successfully updated all RELATED_IMAGE_ environment variables"
echo "Backup saved as ${CSV_FILE}.backup"
rm -f "${CSV_FILE}.backup"
fi
Loading