From 69375bb8e2f659a3a00ef8871a936e5346d94378 Mon Sep 17 00:00:00 2001 From: Kalle Lindqvist Date: Wed, 23 Feb 2022 08:00:57 +0100 Subject: [PATCH] Change --config arg to --kubeconfig `--config` is not a known argument to oc --- README.md | 2 +- packages/openshift/action.py | 2 +- packages/openshift/context.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0a99d03..dbf5a2c 100644 --- a/README.md +++ b/README.md @@ -546,7 +546,7 @@ you can specify many default contexts in the environment. ### Defaults when invoking `oc` Establishing explicit contexts within an application will override these environment defaults. - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_OC_PATH` - default path to use when invoking `oc` -- `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CONFIG_PATH` - default `--config` argument +- `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CONFIG_PATH` - default `--kubeconfig` argument - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_API_SERVER` - default `--server` argument - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_CA_CERT_PATH` - default `--cacert` argument - `OPENSHIFT_CLIENT_PYTHON_DEFAULT_PROJECT` - default `--namespace` argument diff --git a/packages/openshift/action.py b/packages/openshift/action.py index 6652434..677c3d6 100644 --- a/packages/openshift/action.py +++ b/packages/openshift/action.py @@ -230,7 +230,7 @@ def oc_action(context, verb, cmd_args=None, all_namespaces=False, no_namespace=F references = {} if context.get_kubeconfig_path() is not None: - cmds.append("--config=%s" % context.get_kubeconfig_path()) + cmds.append("--kubeconfig=%s" % context.get_kubeconfig_path()) if context.get_api_url() is not None: url = context.get_api_url() diff --git a/packages/openshift/context.py b/packages/openshift/context.py index 5771cc5..45e8916 100644 --- a/packages/openshift/context.py +++ b/packages/openshift/context.py @@ -423,7 +423,7 @@ def api_server(api_url=None, ca_cert_path=None, kubeconfig_path=None): Contexts can be nested. The most immediate ancestor cluster context will define the API server targeted by an action. :param api_url: The oc --server argument to use. - :param kubeconfig_path: The oc --config argument to use. + :param kubeconfig_path: The oc --kubeconfig argument to use. :return: The context object. Can be safely ignored. """