|
| 1 | +############################################################################## |
| 2 | +# Assert that the operator created all expected OKP resources # |
| 3 | +############################################################################## |
| 4 | +# |
| 5 | +# NOTE: The OKP image (registry.redhat.io/offline-knowledge-portal/rhokp-rhel9) |
| 6 | +# is not available in CI, so the OKP pod won't start. Additionally, llama-stack |
| 7 | +# fails at startup when the Solr provider (served by OKP) is unreachable, so the |
| 8 | +# main deployment also won't reach Ready. Therefore, this test only asserts on |
| 9 | +# resource specs (not readyReplicas or CR status) to verify the operator creates |
| 10 | +# the correct resources when OKP is enabled. |
| 11 | + |
| 12 | +# OKP Deployment (spec only — image not pullable in CI) |
| 13 | +--- |
| 14 | +apiVersion: apps/v1 |
| 15 | +kind: Deployment |
| 16 | +metadata: |
| 17 | + name: lightspeed-okp-server |
| 18 | + namespace: openstack-lightspeed |
| 19 | +spec: |
| 20 | + template: |
| 21 | + spec: |
| 22 | + containers: |
| 23 | + - name: okp |
| 24 | + env: |
| 25 | + - name: ACCESS_KEY |
| 26 | + valueFrom: |
| 27 | + secretKeyRef: |
| 28 | + key: access_key |
| 29 | + name: okp-access-key-secret |
| 30 | + ports: |
| 31 | + - name: okp |
| 32 | + containerPort: 8080 |
| 33 | + |
| 34 | +# OKP Service |
| 35 | +--- |
| 36 | +apiVersion: v1 |
| 37 | +kind: Service |
| 38 | +metadata: |
| 39 | + name: lightspeed-okp-server |
| 40 | + namespace: openstack-lightspeed |
| 41 | +spec: |
| 42 | + ports: |
| 43 | + - name: http |
| 44 | + port: 8080 |
| 45 | + protocol: TCP |
| 46 | + targetPort: okp |
| 47 | + type: ClusterIP |
| 48 | + |
| 49 | +# Main deployment — assert OKP env vars are injected (spec only, pod won't be |
| 50 | +# ready because llama-stack can't connect to the OKP Solr provider in CI) |
| 51 | +--- |
| 52 | +apiVersion: apps/v1 |
| 53 | +kind: Deployment |
| 54 | +metadata: |
| 55 | + name: lightspeed-stack-deployment |
| 56 | + namespace: openstack-lightspeed |
| 57 | +spec: |
| 58 | + template: |
| 59 | + spec: |
| 60 | + containers: |
| 61 | + - name: llama-stack |
| 62 | + env: |
| 63 | + - name: OPENSTACK_LIGHTSPEED_PROVIDER_API_KEY |
| 64 | + valueFrom: |
| 65 | + secretKeyRef: |
| 66 | + key: apitoken |
| 67 | + name: openstack-lightspeed-apitoken |
| 68 | + - name: POSTGRES_PASSWORD |
| 69 | + valueFrom: |
| 70 | + secretKeyRef: |
| 71 | + key: password |
| 72 | + name: lightspeed-postgres-secret |
| 73 | + - name: LLAMA_STACK_LOGGING |
| 74 | + value: all=debug |
| 75 | + - name: OGX_LOGGING |
| 76 | + value: all=debug |
| 77 | + - name: VECTOR_DB_DATA_PATH |
| 78 | + value: /vector-db-discovered-values |
| 79 | + - name: RH_SERVER_OKP |
| 80 | + value: http://lightspeed-okp-server.openstack-lightspeed.svc:8080 |
| 81 | + - name: HF_HOME |
| 82 | + value: /tmp/huggingface |
| 83 | + - name: lightspeed-service-api |
| 84 | + env: |
| 85 | + - name: LIGHTSPEED_STACK_LOG_LEVEL |
| 86 | + value: WARNING |
| 87 | + - name: POSTGRES_PASSWORD |
| 88 | + valueFrom: |
| 89 | + secretKeyRef: |
| 90 | + key: password |
| 91 | + name: lightspeed-postgres-secret |
| 92 | + - name: RH_SERVER_OKP |
| 93 | + value: http://lightspeed-okp-server.openstack-lightspeed.svc:8080 |
| 94 | + - name: lightspeed-to-dataverse-exporter |
| 95 | + args: |
| 96 | + - --mode |
| 97 | + - openshift |
| 98 | + - --config |
| 99 | + - /etc/config/config.yaml |
| 100 | + - --log-level |
| 101 | + - DEBUG |
| 102 | + - --data-dir |
| 103 | + - /tmp/data |
0 commit comments