Skip to content

Add gpuop-cfg list-images command for csv and clusterpolicy#2194

Draft
karthikvetrivel wants to merge 1 commit intoNVIDIA:mainfrom
karthikvetrivel:add-gpuop-cfg-list-images-command
Draft

Add gpuop-cfg list-images command for csv and clusterpolicy#2194
karthikvetrivel wants to merge 1 commit intoNVIDIA:mainfrom
karthikvetrivel:add-gpuop-cfg-list-images-command

Conversation

@karthikvetrivel
Copy link
Member

@karthikvetrivel karthikvetrivel commented Mar 6, 2026

Description

Adds a gpuop-cfg list-images [csv|clusterpolicy] command to print all container images referenced in a GPU Operator ClusterServiceVersion or ClusterPolicy manifest. This supports gov readiness workflows where we need to quickly grab the full list of operand images.

The image-listing logic is extracted from the existing validate code into a shared internal/images package so both validate and list-images use the same source of truth. The validate behavior is unchanged.

Checklist

  • No secrets, sensitive information, or unrelated changes
  • Lint checks passing (make lint)
  • Generated assets in-sync (make validate-generated-assets)
  • Go mod artifacts in-sync (make validate-modules)
  • Test cases are added for new code paths

Testing

# List images from helm-rendered ClusterPolicy
# (extract the ClusterPolicy document from helm's multi-resource output)
helm template gpu-operator deployments/gpu-operator \
    | awk '/^---/{if(found)exit}{if(/kind: ClusterPolicy/)found=1}{if(found)print}' \
    | gpuop-cfg list-images clusterpolicy --input /dev/stdin

# List images from bundle ClusterServiceVersion
gpuop-cfg list-images csv --input bundle/manifests/gpu-operator-certified.clusterserviceversion.yaml

Verified that gpuop-cfg validate clusterpolicy and gpuop-cfg validate csv behavior is unchanged, including -ubuntu22.04 os-tag appending for Driver and GPUDirectStorage during validation.

Signed-off-by: Karthik Vetrivel <kvetrivel@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant