From cf40bb8fa5648be05943d2f66def08fbeb1b4a87 Mon Sep 17 00:00:00 2001 From: Daniel Horak Date: Thu, 7 Nov 2024 13:54:36 +0100 Subject: [PATCH] create also kubectl link to oc binary when extracting oc from image - kubectl binary is used by some 3rd party scripts (e.g. ACM deployment script) Signed-off-by: Daniel Horak --- ocs_ci/utility/utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ocs_ci/utility/utils.py b/ocs_ci/utility/utils.py index 4ff2ac1584a..66e1836277f 100644 --- a/ocs_ci/utility/utils.py +++ b/ocs_ci/utility/utils.py @@ -1127,6 +1127,10 @@ def get_openshift_client( "No backups exist and new binary was unable to be verified." ) + if not os.path.exists("kubectl"): + log.info("Creating kubectl link to oc binary.") + os.link("oc", "kubectl") + # return to the previous working directory os.chdir(previous_dir)