Skip to content

Commit

Permalink
Only load service account of kubeconfig was not found (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtomlinson authored Feb 13, 2024
1 parent 72d3757 commit f7f9c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kr8s/_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def reauthenticate(self) -> None:
else:
if self._kubeconfig is not False:
await self._load_kubeconfig()
if self._serviceaccount:
if self._serviceaccount and not self.server:
await self._load_service_account()
if not self.server:
raise ValueError("Unable to find valid credentials")
Expand Down

0 comments on commit f7f9c1c

Please # to comment.