-
Notifications
You must be signed in to change notification settings - Fork 15
feat: Add validation for OCP AI add-ons #884
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zikra-iqbal several times I mentioned not to use the CLI, but use the api the CLI calls - please re-check the issue details. Infact a python script might be better to use here if we are working directly with json (just don't use the requests pip package - use the inbuilt python http library)
@ocofaigh, I’m working on a Python script. I added this validation at the root level and to run the script ibmcloud_api_key is required . But there is no |
|
@zikra-iqbal You don't need to add a |
ocofaigh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks promising - I left some comments. Please show in todays playback.
I'm also wondering if it could be extended to validate any of the addons, not just AI? We can discuss later.
scripts/get_ocp_addon_versions.py
Outdated
| list: Parsed JSON response containing add-on information. | ||
| """ | ||
| url = "/global/v1/addons" | ||
| host = "containers.cloud.ibm.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need an environment variable override here to support other environments such as test.cloud.ibm.com. So you should refactor this to allow the user to pass an enviornmeent variable named IBMCLOUD_CS_API_ENDPOINT. If user does not specify the enviornment variable, the default value should be https://containers.test.cloud.ibm.com/global as per the provider docs:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.




Description
Added validation for OCP AI add-ons by retrieving the openshift-ai
versionand itssupported OpenShift rangevia the API used by the CLI commandibmcloud oc cluster addon versions --output json, using the external data block.Added a Python script
scripts/get_ocp_addon_versions.pythat retrieves the available OpenShift add-on versions. It is a generic script that can be used for add-on validations in the future and is not restricted to the OCP AI Add-on.Release required?
x.x.X)x.X.x)X.x.x)Release notes content
Add validation for OCP AI add-ons.
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers