|
| 1 | +# cloudkitty kuttl test |
| 2 | + |
| 3 | +The "cloudkitty" kuttl test covers the deployment and configuration of the CloudKitty CR, which manages the OpenStack Rating service for cloud resources. |
| 4 | + |
| 5 | +## Topology |
| 6 | + |
| 7 | +The target topology for this test is: |
| 8 | + |
| 9 | +1. one CloudKitty object managing two sub-components: |
| 10 | + - CloudKittyAPI (API service with 1 replica) |
| 11 | + - CloudKittyProc (rating processor with 1 replica) |
| 12 | +2. LokiStack for metrics storage backend |
| 13 | +3. CloudKittyAPI pod containing: |
| 14 | + - cloudkitty-api container |
| 15 | + - log sidecar container |
| 16 | +4. CloudKittyProc pod containing: |
| 17 | + - cloudkitty-proc container |
| 18 | +5. S3 storage (MinIO) for LokiStack backend |
| 19 | +6. TLS certificates for Loki communication |
| 20 | +7. Keystone integration (KeystoneService and KeystoneEndpoint) |
| 21 | + |
| 22 | +The cloudkitty test steps cover: |
| 23 | +- Basic deployment with LokiStack integration |
| 24 | +- Custom configuration mounting for both API and Proc |
| 25 | +- Application credential authentication |
| 26 | +- Application credential rotation |
| 27 | + |
| 28 | +### Prerequisites |
| 29 | + |
| 30 | +As a prerequisite for this test, we assume: |
| 31 | + |
| 32 | +1. an existing `MariaDB/Galera` entity in the target namespace |
| 33 | +2. an existing `Keystone` deployed via keystone-operator |
| 34 | +3. an existing `Memcached` instance in the target namespace |
| 35 | +4. an existing `RabbitMQ` cluster in the target namespace |
| 36 | +5. a running `Loki Operator` in the cluster |
| 37 | +6. S3-compatible storage (MinIO) for LokiStack backend |
| 38 | +7. a running `telemetry-operator` deployed in the cluster |
| 39 | + |
| 40 | +These resources are deployed via the `deps/` directory using kustomize. |
| 41 | + |
| 42 | +**Note:** This test has a longer timeout (600s) because LokiStack can take significant time to become ready. |
| 43 | + |
| 44 | +### Run the cloudkitty tests |
| 45 | + |
| 46 | +Once the kuttl requirements are satisfied, the actual tests can be executed from the telemetry-operator root directory via: |
| 47 | + |
| 48 | +```bash |
| 49 | +cd telemetry-operator/ |
| 50 | +oc kuttl test --test cloudkitty --namespace telemetry-kuttl-cloudkitty |
| 51 | +``` |
| 52 | + |
| 53 | +Same tests can be executed from a different location via: |
| 54 | + |
| 55 | +```bash |
| 56 | +oc kuttl test --config <KUTTL_CONFIG> <KUTTL_TESTS_DIR> --test cloudkitty --namespace telemetry-kuttl-cloudkitty |
| 57 | +``` |
| 58 | + |
| 59 | +> **NOTE**: <KUTTL_CONFIG> is the path where kuttl-test.yaml for the repo is located and <KUTTL_TESTS_DIR> is where the tests are located. |
0 commit comments