util: Fix tracevol to use --config for oc only

tracevol.py uses --config instead of --kubeconfig when invoked with
-c kubectl and -k <some_path> at the same time.

Signed-off-by: Santiago Sanchez Paz <sanchezpaz@gmail.com>
This commit is contained in:
Santiago Sanchez Paz 2020-08-13 18:07:16 +02:00 committed by mergify[bot]
parent 8c2bdbc001
commit 6ece9bed92

View File

@ -502,6 +502,7 @@ def get_pv_data(arg, pvname):
pvdata = {}
cmd = [arg.command]
if arg.kubeconfig != "":
if arg.command == "oc":
cmd += ["--config", arg.kubeconfig]
else:
cmd += ["--kubeconfig", arg.kubeconfig]