Skip to content

Commit 3db6697

Browse files
committed
docs: add docs for service image validation
1 parent 9d681ae commit 3db6697

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

tests/model_explainability/trustyai_operator/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ def validate_trustyai_operator_image(
1919
2020
Returns:
2121
None
22+
23+
Raises:
24+
AssertionError: If any of the related images references are not present or invalid.
2225
"""
2326
tai_operator_image = tai_operator_deployment.instance.spec.template.spec.containers[0].image
2427
assert tai_operator_image == tai_operator_configmap_data["trustyaiOperatorImage"]

tests/model_explainability/trustyai_service/utils.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,21 @@ def validate_trustyai_service_images(
256256
label_selector: str,
257257
trustyai_operator_configmap: ConfigMap,
258258
) -> None:
259-
"""Validates the TrustyAI service container images."""
259+
"""Validates trustyai service images against a set of related images.
260+
261+
Args:
262+
client: DynamicClient: The Kubernetes dynamic client.
263+
related_images_refs: list[str]: Related images references from RHOAI CSV.
264+
model_namespace: Namespace: namespace to run the test against.
265+
label_selector: str: Label selector string to get the trustyai pod.
266+
trustyai_operator_configmap: ConfigMap: The trustyai operator configmap.
267+
268+
Returns:
269+
None
270+
271+
Raises:
272+
AssertionError: If any of the related images references are not present or invalid.
273+
"""
260274
tai_image_refs = set(
261275
v
262276
for k, v in trustyai_operator_configmap.instance.data.items()

0 commit comments

Comments
 (0)