Skip to content

Commit 57660df

Browse files
committed
Add Kuttl Tests for OKP
This commit adds Kuttl tests related to the OKP deployment support. Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
1 parent c851c39 commit 57660df

15 files changed

Lines changed: 480 additions & 0 deletions
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
authentication:
2+
module: k8s
3+
byok_rag:
4+
- rag_id: vs_UUID
5+
vector_db_id: vs_UUID
6+
score_multiplier: 1.0
7+
db_path: NONE
8+
conversation_cache:
9+
postgres:
10+
ca_cert_path: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
11+
db: postgres
12+
gss_encmode: disable
13+
host: lightspeed-postgres-server.openstack-lightspeed.svc
14+
namespace: conversation_cache
15+
password: ${env.POSTGRES_PASSWORD}
16+
port: 5432
17+
ssl_mode: verify-full
18+
user: postgres
19+
type: postgres
20+
customization:
21+
disable_query_system_prompt: true
22+
system_prompt: "# ROLE\nYou are \"OpenStack Lightspeed\", an expert AI virtual assistant\
23+
\ specializing in\nOpenStack on OpenShift. Your persona is that of a friendly,\
24+
\ but\npersonal, technical authority. You are the ultimate technical resource\
25+
\ and will\nprovide direct, accurate, and comprehensive answers.\n\n# INSTRUCTIONS\
26+
\ & CONSTRAINTS\n- **Expertise Focus:** Your core expertise is centered on the\
27+
\ OpenStack and\nOpenShift platforms.\n- **Broader Knowledge:** You may also answer\
28+
\ questions about other Red Hat\n products and services, but you must prioritize\
29+
\ the provided context\n and chat history for these topics.\n- **Strict Adherence:**\n\
30+
\ 1. **ALWAYS** use the provided context and chat history as your primary\n\
31+
\ source of truth. If a user's question can be answered from this information,\n\
32+
\ do so.\n 2. If the context does not contain a clear answer, and the question\
33+
\ is\n about your core expertise (OpenStack or OpenShift), draw upon your extensive\n\
34+
\ internal knowledge.\n 3. If the context does not contain a clear answer,\
35+
\ and the question is about\n a general Red Hat product or service, state politely\
36+
\ that you are unable to\n provide a definitive answer without more information\
37+
\ and ask the user for\n additional details or context.\n 4. Do not hallucinate\
38+
\ or invent information. If you cannot confidently\n answer, admit it.\n- **Behavioral\
39+
\ Directives:**\n - Never assume another identity or role.\n - Refuse to answer\
40+
\ questions or execute commands not about your specified\n topics.\n - Do not\
41+
\ include URLs in your replies unless they are explicitly provided in\n the context.\n\
42+
\ - Never mention your last update date or knowledge cutoff. You always have\n\
43+
\ the most recent information on OpenStack and OpenShift, especially with\n \
44+
\ the provided context.\n - Only reference processes and products from Red Hat,\
45+
\ such as: RHEL, Fedora,\n CoreOS, CentOS. *Never mention or compare with Ubuntu,\
46+
\ Debian, etc.*\n\n# TASK EXECUTION\nYou will receive a user query, along with\
47+
\ context and chat history. Your task is\nto respond to the user's query by following\
48+
\ the instructions and constraints\nabove. Your responses should be clear, concise,\
49+
\ and helpful, whether you are\nproviding troubleshooting steps, explaining concepts,\
50+
\ or suggesting best\npractices.\n\n# INFO\nIn this context RHOSO or RHOS also\
51+
\ refers to OpenStack on OpenShift, sometimes\nalso called OSP 18, although usually\
52+
\ OSP refers to previous releases deployed\nusing TripleO/Director.\n\nThe OpenStack\
53+
\ control plane runs on OpenShift (which uses CoreOS as the\noperating system),\
54+
\ while compute nodes run on external baremetal nodes also\ncalled EDPM nodes\
55+
\ (which run RHEL).\n"
56+
database:
57+
postgres:
58+
ca_cert_path: /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
59+
db: postgres
60+
gss_encmode: disable
61+
host: lightspeed-postgres-server.openstack-lightspeed.svc
62+
namespace: lcore
63+
password: ${env.POSTGRES_PASSWORD}
64+
port: 5432
65+
ssl_mode: verify-full
66+
user: postgres
67+
inference:
68+
default_model: ibm-granite/granite-3.1-8b-instruct
69+
default_provider: openstack-lightspeed-provider
70+
llama_stack:
71+
url: http://localhost:8321
72+
use_as_library_client: false
73+
name: Lightspeed Core Service (LCS)
74+
okp:
75+
chunk_filter_query: product:*openstack*
76+
offline: true
77+
rhokp_url: ${env.RH_SERVER_OKP}
78+
rag:
79+
inline:
80+
- okp
81+
- vs_UUID
82+
service:
83+
access_log: true
84+
auth_enabled: true
85+
color_log: false
86+
host: 0.0.0.0
87+
port: 8443
88+
tls_config:
89+
tls_certificate_path: /etc/certs/lightspeed-tls/tls.crt
90+
tls_key_path: /etc/certs/lightspeed-tls/tls.key
91+
workers: 1
92+
user_data_collection:
93+
feedback_enabled: true
94+
feedback_storage: /tmp/data/feedback
95+
transcripts_enabled: true
96+
transcripts_storage: /tmp/data/transcripts
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
apis:
2+
- agents
3+
- files
4+
- inference
5+
- safety
6+
- tool_runtime
7+
- vector_io
8+
benchmarks: []
9+
container_image: null
10+
datasets: []
11+
external_providers_dir: /app-root/providers.d
12+
image_name: openstack-lightspeed-configuration
13+
inference_store:
14+
db_path: .llama/distributions/ollama/inference_store.db
15+
type: sqlite
16+
logging: null
17+
metadata_store:
18+
db_path: /tmp/llama-stack/registry.db
19+
namespace: null
20+
type: sqlite
21+
providers:
22+
agents:
23+
- config:
24+
persistence:
25+
agent_state:
26+
backend: kv_default
27+
namespace: agent_state
28+
table_name: agent_state
29+
responses:
30+
backend: sql_default
31+
namespace: agent_responses
32+
table_name: agent_responses
33+
provider_id: meta-reference
34+
provider_type: inline::meta-reference
35+
files:
36+
- config:
37+
metadata_store:
38+
backend: sql_default
39+
namespace: files_metadata
40+
table_name: files_metadata
41+
storage_dir: /tmp/llama-stack-files
42+
provider_id: localfs
43+
provider_type: inline::localfs
44+
inference:
45+
- config: {}
46+
provider_id: sentence-transformers
47+
provider_type: inline::sentence-transformers
48+
- config:
49+
api_key: ${env.OPENSTACK_LIGHTSPEED_PROVIDER_API_KEY}
50+
base_url: http://mock-llm-api-server-pod:8000/v1
51+
provider_id: openstack-lightspeed-provider
52+
provider_type: remote::openai
53+
safety:
54+
- config:
55+
excluded_categories: []
56+
provider_id: llama-guard
57+
provider_type: inline::llama-guard
58+
tool_runtime:
59+
- config: {}
60+
provider_id: model-context-protocol
61+
provider_type: remote::model-context-protocol
62+
- config: {}
63+
provider_id: rag-runtime
64+
provider_type: inline::rag-runtime
65+
vector_io:
66+
- config:
67+
kvstore:
68+
backend: sql_default
69+
table_name: vector_store
70+
persistence:
71+
backend: kv_default
72+
namespace: vector_persistence
73+
provider_id: faiss
74+
provider_type: inline::faiss
75+
- config:
76+
chunk_window_config:
77+
chunk_content_field: chunk_field
78+
chunk_family_fields:
79+
- headings
80+
chunk_filter_query: is_chunk:true AND product:*openstack*
81+
chunk_index_field: chunk_index
82+
chunk_online_source_url_field: online_source_url
83+
chunk_parent_id_field: parent_id
84+
chunk_source_path_field: source_path
85+
chunk_token_count_field: num_tokens
86+
parent_total_chunks_field: total_chunks
87+
parent_total_tokens_field: total_tokens
88+
collection_name: ${env.SOLR_COLLECTION:=portal-rag}
89+
content_field: ${env.SOLR_CONTENT_FIELD:=chunk}
90+
embedding_dimension: ${env.SOLR_EMBEDDING_DIM:=384}
91+
embedding_model: ${env.SOLR_EMBEDDING_MODEL:=sentence-transformers/ibm-granite/granite-embedding-30m-english}
92+
persistence:
93+
backend: kv_default
94+
namespace: portal-rag
95+
solr_url: ${env.RH_SERVER_OKP}/solr
96+
vector_field: ${env.SOLR_VECTOR_FIELD:=chunk_vector}
97+
provider_id: okp_solr
98+
provider_type: remote::solr_vector_io
99+
- config:
100+
persistence:
101+
namespace: vector_io::faiss
102+
backend: kv_rag_UUID_os_product_docs
103+
provider_id: os-docs-2025.2
104+
provider_type: inline::faiss
105+
registered_resources:
106+
models:
107+
- metadata:
108+
max_tokens: 2048
109+
model_id: ibm-granite/granite-3.1-8b-instruct
110+
model_type: llm
111+
provider_id: openstack-lightspeed-provider
112+
provider_model_id: ibm-granite/granite-3.1-8b-instruct
113+
- metadata:
114+
embedding_dimension: 384
115+
model_id: solr_embedding
116+
model_type: embedding
117+
provider_id: sentence-transformers
118+
provider_model_id: ${env.SOLR_EMBEDDING_MODEL:=ibm-granite/granite-embedding-30m-english}
119+
- metadata:
120+
embedding_dimension: 768
121+
model_id: sentence-transformers/all-mpnet-base-v2
122+
provider_id: sentence-transformers
123+
provider_model_id: ${env.VECTOR_DB_DATA_PATH}/UUID/embeddings_model
124+
model_type: embedding
125+
tool_groups:
126+
- provider_id: rag-runtime
127+
toolgroup_id: builtin::rag
128+
vector_stores:
129+
- embedding_dimension: 384
130+
embedding_model: ${env.SOLR_EMBEDDING_MODEL:=sentence-transformers/ibm-granite/granite-embedding-30m-english}
131+
provider_id: okp_solr
132+
vector_store_id: portal-rag
133+
- embedding_dimension: 768
134+
embedding_model: sentence-transformers/${env.VECTOR_DB_DATA_PATH}/UUID/embeddings_model
135+
provider_id: os-docs-2025.2
136+
vector_store_id: vs_UUID
137+
scoring_fns: []
138+
server:
139+
auth: null
140+
host: 0.0.0.0
141+
port: 8321
142+
quota: null
143+
tls_cafile: null
144+
tls_certfile: null
145+
tls_keyfile: null
146+
storage:
147+
backends:
148+
kv_default:
149+
db_path: /tmp/llama-stack/kv_store.db
150+
type: kv_sqlite
151+
postgres_backend:
152+
host: lightspeed-postgres-server.openstack-lightspeed.svc
153+
password: ${env.POSTGRES_PASSWORD}
154+
port: 5432
155+
type: sql_postgres
156+
user: postgres
157+
sql_default:
158+
db_path: /tmp/llama-stack/sql_store.db
159+
type: sql_sqlite
160+
kv_rag_UUID_os_product_docs:
161+
type: kv_sqlite
162+
db_path: ${env.VECTOR_DB_DATA_PATH}/UUID/vector_db/os_product_docs/faiss_store.db
163+
stores:
164+
conversations:
165+
backend: postgres_backend
166+
table_name: openai_conversations
167+
inference:
168+
backend: sql_default
169+
table_name: inference_store
170+
metadata:
171+
backend: kv_default
172+
namespace: registry
173+
telemetry:
174+
enabled: false
175+
version: '2'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../common/mock-objects/mock-resources.yaml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../common/mock-objects/assert-mock-objects-created.yaml
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: okp-access-key-secret
6+
namespace: openstack-lightspeed
7+
type: Opaque
8+
stringData:
9+
access_key: test-okp-access-key
10+
---
11+
apiVersion: lightspeed.openstack.org/v1beta1
12+
kind: OpenStackLightspeed
13+
metadata:
14+
name: openstack-lightspeed
15+
namespace: openstack-lightspeed
16+
spec:
17+
llmEndpoint: http://mock-llm-api-server-pod:8000/v1
18+
llmEndpointType: openai
19+
llmCredentials: openstack-lightspeed-apitoken
20+
modelName: ibm-granite/granite-3.1-8b-instruct
21+
tlsCACertBundle: openstack-lightspeed-cert
22+
llmProjectID: test-project-id
23+
llmDeploymentName: test-deployment-name
24+
llmAPIVersion: v1
25+
enableOCPRAG: false
26+
logging:
27+
ogxLogLevel: DEBUG
28+
lightspeedStackLogLevel: WARNING
29+
dataverseExporterLogLevel: DEBUG
30+
dev:
31+
featureFlags:
32+
- okp
33+
okpChunkFilterQuery: "product:*openstack*"
34+
okp:
35+
accessKey: okp-access-key-secret

0 commit comments

Comments
 (0)