|
15 | 15 | from utilities.monitoring import validate_metrics_field |
16 | 16 | from utilities.inference_utils import Inference |
17 | 17 | from utilities.manifests.onnx import ONNX_INFERENCE_CONFIG |
| 18 | +from utilities.jira import is_jira_open |
18 | 19 |
|
19 | 20 | LOGGER = get_logger(name=__name__) |
20 | 21 |
|
@@ -66,8 +67,25 @@ def test_ovms_keda_scaling_verify_scaledobject( |
66 | 67 | unprivileged_client: DynamicClient, |
67 | 68 | ovms_kserve_serving_runtime, |
68 | 69 | stressed_ovms_keda_inference_service: Generator[InferenceService, Any, Any], |
| 70 | + admin_client: DynamicClient, |
69 | 71 | ): |
70 | 72 | """Test KEDA ScaledObject configuration and run inference multiple times to trigger scaling.""" |
| 73 | + |
| 74 | + if is_jira_open(jira_id="RHOAIENG-31386", admin_client=admin_client): |
| 75 | + patch_operations = [ |
| 76 | + { |
| 77 | + "op": "add", |
| 78 | + "path": "/spec/predictor/autoScaling/metrics/0/external/authenticationRef", |
| 79 | + "value": {"authModes": "bearer", "authenticationRef": {"name": "inference-prometheus-auth"}}, |
| 80 | + } |
| 81 | + ] |
| 82 | + admin_client.resources.get(api_version="v1beta1", kind="InferenceService").patch( |
| 83 | + name=stressed_ovms_keda_inference_service.name, |
| 84 | + namespace=stressed_ovms_keda_inference_service.namespace, |
| 85 | + body=patch_operations, |
| 86 | + content_type="application/json-patch+json", |
| 87 | + ) |
| 88 | + |
71 | 89 | verify_keda_scaledobject( |
72 | 90 | client=unprivileged_client, |
73 | 91 | isvc=stressed_ovms_keda_inference_service, |
|
0 commit comments