diff options
| -rw-r--r-- | robusta_krr/core/models/config.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/robusta_krr/core/models/config.py b/robusta_krr/core/models/config.py index aaadaa8..d4f04a0 100644 --- a/robusta_krr/core/models/config.py +++ b/robusta_krr/core/models/config.py @@ -146,6 +146,9 @@ class Config(pd.BaseSettings): self.inside_cluster = True def get_kube_client(self, context: Optional[str] = None): + if context is None: + return None + api_client = config.new_client_from_config(context=context, config_file=self.kubeconfig) if self.impersonate_user is not None: # trick copied from https://github.com/kubernetes-client/python/issues/362 |
