Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHOAIENG-12833 - Validate Image Pull Path Is From registry.redhat.io #1809

Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ ${IS_NOT_PRESENT} 1
... KSERVE=${EMPTY}

@{CONTROLLERS_LIST} kserve-controller-manager odh-model-controller modelmesh-controller
@{REDHATIO_PATH_CHECK_EXCLUSTION_LIST} kserve-controller-manager


*** Test Cases ***
Expand Down Expand Up @@ -304,6 +305,8 @@ Set DSC Component Managed State And Wait For Completion

Wait For Resources To Be Available ${deployment_name} ${label_selector}

Check Image Pull Path Is Redhatio ${deployment_name}

Wait For Resources To Be Available
[Documentation] Wait until Deployment and Pod(s) are Available
[Arguments] ${deployment_name} ${label_selector}
Expand Down Expand Up @@ -358,3 +361,24 @@ Get DataScienceCluster Spec
... oc get DataScienceCluster/${DSC_NAME} -n ${OPERATOR_NS} -o "jsonpath={".spec"}"
Should Be Equal As Integers ${rc} 0
RETURN ${output}

Check Image Pull Path Is Redhatio
[Documentation] Check that the Deployment Image Pull Path is registry.redhat.io
[Arguments] ${deployment_name}

# Skip pull path check if Deployment is in exclusion list
IF $deployment_name in @{REDHATIO_PATH_CHECK_EXCLUSTION_LIST}
Log To Console Skip image pull path check for Deployment ${deployment_name}
RETURN
END

${rc} ${image}= Run And Return Rc And Output
... oc get deployment/${deployment_name} -n ${APPLICATIONS_NAMESPACE} -o jsonpath="{..image}"
Should Be Equal As Integers ${rc} 0 msg=${image}

Log To Console Check deployment ${deployment_name} pull path for image ${image}
IF "registry.redhat.io" in $image
Log To Console Deployment ${deployment_name} image contains pull path registry.redhat.io
ELSE
Fail Deployment image ${deployment_name} does not contain pull path registry.redhat.io
END
Loading