Skip to content

Commit 4a59878

Browse files
committed
fixing the script with providing proper images list to check out
Signed-off-by: Piotr <[email protected]>
1 parent 3348960 commit 4a59878

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/kaas/k8s-version-policy/k8s_version_policy.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,11 @@ async def scan_k8s_images(images_to_scan) -> None:
458458
)
459459

460460

461+
async def get_images_and_scan(kubeconfig, context=None) -> None:
462+
images_to_scan = await get_k8s_pod_images(kubeconfig, context)
463+
await scan_k8s_images(images_to_scan)
464+
465+
461466
async def get_k8s_cluster_info(kubeconfig, context=None) -> ClusterInfo:
462467
"""Get the k8s version of the cluster under test."""
463468
cluster_config = await kubernetes_asyncio.config.load_kube_config(kubeconfig, context)
@@ -562,7 +567,9 @@ async def main(argv):
562567
with context {config.context if config.context else ''}.
563568
Fetching cluster information and verifying access.""")
564569
await get_k8s_cluster_info(config.kubeconfig, config.context)
565-
await scan_k8s_images(config.kubeconfig)
570+
await get_images_and_scan(config.kubeconfig, config.context)
571+
# images_to_scan = await get_k8s_pod_images(config.kubeconfig, config.context)
572+
# await scan_k8s_images(images_to_scan=images_to_scan)
566573

567574
except CriticalException as e:
568575
logger.critical(e)

0 commit comments

Comments
 (0)