Skip to content

Commit

Permalink
Hotfix for error when running in cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaveMyYard committed Apr 2, 2024
1 parent c6a5bf7 commit a005d7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions robusta_krr/core/models/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ def load_kubeconfig(self) -> None:
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
Expand Down

0 comments on commit a005d7e

Please sign in to comment.